Read about scripting
Gets/sets the RGB colour for one of the 8 ANSI normal colours
View list of data type meanings
long NormalColour(short WhichColour);
void NormalColour(short WhichColour, long nNewValue);
You can use this property to get or set the RGB colours used for the 8 ANSI normal colours. You must specify *which* colour you want to get/set, in the range 1 to 8, as follows:
black = 1
red = 2
green = 3
yellow = 4
blue = 5
magenta = 6
cyan = 7
white = 8
If you are setting the colour you must specify an RGB value. Some pre-defined values are available in VBscript, see below.
Constant Value Description
vbBlack &h00 Black
vbRed &hFF Red
vbGreen &hFF00 Green
vbYellow &hFFFF Yellow
vbBlue &hFF0000 Blue
vbMagenta &hFF00FF Magenta
vbCyan &hFFFF00 Cyan
vbWhite &hFFFFFF White
In JScript you will need to use the RGB values, for example Magenta would be: 0xFF00FF.
You should be cautious doing frequent colour changes, because what happens is that you are changing the *palette* colour. What this means in practice is that if you change (say) the white colour (colour 8) then when new text appears on the screen it will be drawn in the new colour, however existing text will stay the old colour *until* it is redrawn (eg. is covered by a dialog box). This may lead to patchy bits of different colour on the screen.
You can have different colours on the screen (at the same time) by using the 16 custom colours, but only 16 different colours can be visible at once.
You can force a redraw of the whole world's window(s) by using the "Redraw" method.
See also BoldColour.
world.note world.normalcolour (3)
world.normalcolour (3) = vbGreen
world.normalcolour (8) = &h303030
world.redraw ' redraw screen
world.normalcolour (3) = 0xFF00;
world.normalcolour (8) = 0x303030;
world.redraw(); // redraw screen
$world->redraw # redraw screen
world.normalcolour (3) = 0xFF00
world.normalcolour (8) = 0x303030
world.redraw # redraw screen
Note (GetNormalColour (2))
SetNormalColour (2, 254)
Redraw() -- redraw screen
Lua implements this as two functions:
GetNormalColour - gets the normal colour
SetNormalColour - sets the normal colour
This is a property. You can use it to find the current normal colour.
See Also ...
(AdjustColour) Adjust an RGB colour
(ANSI) Generates an ANSI colour sequence
(BoldColour) Gets/sets the RGB colour for one of the 8 ANSI bold colours
(ColourNameToRGB) Converts a named colour to a RGB colour code.
(ColourNote) Sends a message to the output window in specified colours
(ColourTell) Sends a message to the output window in specified colours - not terminated by a newline
(CustomColourBackground) Sets the RGB value for the background of a custom colour
(CustomColourText) Sets the RGB value for the text of a custom colour
(GetCustomColourName) Gets the name of a custom colour
(GetMapColour) Returns the mapping for how a particular colour will be displayed
(MapColour) Changes the colour mapping - the way colours are displayed
(MapColourList) Returns an array of all the mapped colours
(NoteColour) Chooses which custom colour will be used for world notes.
(NoteColourBack) Chooses which RGB colour will be used for world notes - background colour
(NoteColourFore) Chooses which RGB colour will be used for world notes - text colour
(NoteColourName) Chooses which RGB colour name will be used for world notes - text and background
(NoteColourRGB) Chooses which RGB colour will be used for world notes - text and background
(PickColour) Invokes the MUSHclient colour picker dialog
(Redraw) Schedules a redraw for all windows for this world
(RGBColourToName) Converts an RGB colour code to its equivalent name
(SetCustomColourName) Sets the name of a custom colour
(Help topic: function=NormalColour)