Register to post in forums, or Log in to your existing account
 

 Related 
Contents
Miscellaneous
  #CR
  #DEBUGFILE
  #EXECUTE
  #EXECWIN
  #FTP
  #HELP
  #MSS
  #NOOP
  #SCRIPT
  #SEND
  #SENDPROMPT
  #SENDRAW
  #SENDSB
  #SS
  #VERSION
  #WIZLIST
  %ansi
  %clip
  %color
  %exec
  %exp
  %expand
  %gsl
  %literal
  %mcp
  %mss
  %null
  %numparam
  %param
  %params
  %random
  %time
  Miscellaneous
Function Reference
  %abs
  %additem
  %addkey
  %alarm
  %alias
  %ansi
  %array
  %arrget
  %arrhigh
  %arrset
  %ascii
  %average
  %begins
  %bitand
  %bitnot
  %bitor
  %bitset
  %bitshift
  %bittest
  %bitxor
  %btncol
  %btnenable
  %btnimage
  %case
  %char
  %charcomment
  %charnotes
  %class
  %clip
  %color
  %colorname
  %colorsyntax
  %comactive
  %comcreate
  %comget
  %comset
  %concat
  %copy
  %count
  %countlist
  %crtonl
  %db
  %dbget
  %dbitems
  %dbkey
  %dbkeys
  %dblist
  %dbmax
  %dbmin
  %dbvalues
  %dde
  %ddeclose
  %ddemacro
  %ddeopen
  %ddepoke
  %defined
  %delete
  %delitem
  %delkey
  %delnitem
  %destroom
  %dice
  %diceavg
  %dicedev
  %dicemax
  %dicemin
  %doorname
  %dups
  %ends
  %eval
  %exec
  %exp
  %expand
  %expanddb
  %expandlist
  %filesize
  %find
  %float
  %format
  %getglobal
  %grep
  %gsl
  %handle
  %hexcolor
  %hexnum
  %hexstr
  %htmldecode
  %htmlencode
  %iconstate
  %if
  %insert
  %int
  %inwalk
  %isfloat
  %iskey
  %ismember
  %isnumber
  %isvalue
  %item
  %json
  %lastdir
  %left
  %leftback
  %len
  %line
  %list
  %literal
  %look
  %lower
  %mapfilter
  %maplocked
  %mapquery
  %mapvnum
  %match
  %max
  %mcp
  %min
  %mod
  %mss
  %nextdir
  %nltocr
  %norm
  %null
  %number
  %numbuttons
  %numitems
  %numkeys
  %numparam
  %numrec
  %numrooms
  %numwords
  %numzones
  %packages
  %param
  %params
  %parsemode
  %parsenumbers
  %pat
  %pathcompress
  %pathexpand
  %pathfrom
  %pathreverse
  %pick
  %pop
  %portal
  %portalenabled
  %pos
  %pref
  %priority
  %prompt
  %proper
  %push
  %query
  %quote
  %random
  %read
  %ref
  %regex
  %remove
  %repeat
  %replace
  %replaceitem
  %reversedir
  %rgb
  %right
  %rightback
  %roomcol
  %roomcom
  %roomcontents
  %roomcost
  %roomdesc
  %roomexit
  %roomflags
  %roomid
  %roomint
  %roomkey
  %roomkind
  %roomlink
  %roomload
  %roommode
  %roomname
  %roomnote
  %roomnum
  %roomportal
  %roomvnum
  %roomzone
  %round
  %section
  %setglobal
  %sort
  %sql
  %sqldb
  %sqrt
  %state
  %stdev
  %string
  %stripansi
  %stripq
  %subchar
  %subregex
  %sum
  %switch
  %threadid
  %threadname
  %time
  %trigger
  %trim
  %trimleft
  %trimright
  %upper
  %url
  %vartype
  %viewrec
  %walk
  %walkactive
  %walkconfirm
  %walkmode
  %walkroom
  %window
  %word
  %write
  %yesno
  %zonename
  %zonenum
  %zonevnum
Related Links:
  %roomcol
  #COLOR
  #CW
  #PCOL
  Miscellaneous
  MXP
%colorname [[cmud_%colorname]] 
colorname

Syntax: %colorname(string)
Related: %rgb, %hexcolor

Converts the HTML color name in string to an RGB color value. Actually returns a value in #00BBGGRR format since that is what is required by the Windows API. The returned color is compatible with routines that can use any Windows color such as %roomcol. If the color does not exist, the clNone color is returned which has a value of 536870911.

Instead of a name as shown below, you can also specify s in the format #RRGGBB and it will be converted to the BGR color used by Windows.

Examples:

#SHOW %colorname(red)
returns 255

#SHOW %colorname(#FF0000)
returns 255

#CALL %roomcol(1,%colorname(#FF0000))
colors room number 1 in red.

Supported colors are:
'aliceblue',
'antiquewhite',
'aqua',
'aquamarine',
'azure',
'beige',
'bisque',
'black',
'blanchedalmond',
'blue',
'blueviolet',
'brown',
'burlywood',
'cadetblue',
'chartreuse',
'chocolate',
'coral',
'cornflowerblue',
'cornsilk',
'crimson',
'cyan',
'darkblue',
'darkcyan',
'darkgoldenrod',
'darkgray',
'darkgreen',
'darkkhaki',
'darkmagenta',
'darkolivegreen',
'darkorange',
'darkorchid',
'darkred',
'darksalmon',
'darkseagreen',
'darkslateblue',
'darkslategray',
'darkturquoise',
'darkviolet',
'deeppink',
'deepskyblue',
'dimgray',
'dodgerblue',
'firebrick',
'floralwhite',
'forestgreen',
'fuchsia',
'gainsboro',
'ghostwhite',
'gold',
'goldenrod',
'gray',
'green',
'greenyellow',
'honeydew',
'hotpink',
'indianred',
'indigo',
'ivory',
'khaki',
'lavender',
'lavenderblush',
'lawngreen',
'lemonchiffon',
'lightblue',
'lightcoral',
'lightcyan',
'lightgoldenrodyellow',
'lightgreen',
'lightgrey',
'lightpink',
'lightsalmon',
'lightseagreen',
'lightskyblue',
'lightslategray',
'lightsteelblue',
'lightyellow',
'lime',
'limegreen',
'linen',
'magenta',
'maroon',
'mediumaquamarine',
'mediumblue',
'mediumorchid',
'mediumpurple',
'mediumseagreen',
'mediumslateblue',
'mediumspringgreen',
'mediumturquoise',
'mediumvioletred',
'midnightblue',
'mintcream',
'mistyrose',
'moccasin',
'navajowhite',
'navy',
'oldlace',
'olive',
'olivedrab',
'orange',
'orangered',
'orchid',
'palegoldenrod',
'palegreen',
'paleturquoise',
'palevioletred',
'papayawhip',
'peachpuff',
'peru',
'pink',
'plum',
'powderblue',
'purple',
'red',
'rosybrown',
'royalblue',
'saddlebrown',
'salmon',
'sandybrown',
'seagreen',
'seashell',
'sienna',
'silver',
'skyblue',
'slateblue',
'slategray',
'snow',
'springgreen',
'steelblue',
'tan',
'teal',
'thistle',
'tomato',
'turquoise',
'violet',
'wheat',
'white',
'whitesmoke',
'yellow',
'yellowgreen'

 User comments 
hpoonis2010: Thu Jun 20, 2019 10:41 am    

The colours listed do not activate in cMUD. In zMUD more of them worked but in cMUD most do not.

I gave up trying to use the format $RRGGBB with %roomcol as that format generates a LOCAL VARIABLE error message.

Eg., (as onroomenter EVENT condition does not work) I manually get the room terrain info from gmcp and use that to trigger colouring the room.

I am trying a number of colours but only some work. It is very frustrating.
hpoonis2010: Fri Jun 21, 2019 7:21 am    

OK. 'colorname' (apparently) does not take localisation into account. Although the suggestion is that the #CALL to COM will use Windows colour definitions...it seems it only uses US colour definitions. Thus, eg., 'slategray' will work but 'slategrey' will not.
Viewer Comments [2 - Post your comments]

Jump to:  

© 2009 Zugg Software. Hosted by Wolfpaw.net