CustomColourBackground
Script function

world.CustomColourBackground

DOC_scripting Read about scripting

Type

Property

Summary

Sets the RGB value for the background of a custom colour

Prototype

long CustomColourBackground(short WhichColour);
void CustomColourBackground(short WhichColour, long nNewValue);


DOC_data_types View list of data type meanings


Description

You can use this property to get or set the RGB colours used for the background of the 16 custom colours. You must specify *which* colour you want to get/set, in the range 1 to 16.

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 NormalColour, BoldColour and CustomColourText.



VBscript example

world.note world.customcolourbackground (10)
world.customcolourbackground (14) = vbBlack



Jscript example

world.Note(world.customcolourbackground(10));
world.customcolourbackground(14) = 0;



PerlScript example

$world->Note($world->customcolourbackground(10));



Python example

world.Note(world.customcolourbackground(10))
world.customcolourbackground(14) = 0



Lua example

Note (GetCustomColourBackground (10))
SetCustomColourBackground (14, 0)



Lua notes

Lua implements this as two functions:

GetCustomColourBackground - gets the custom colour background
SetCustomColourBackground - sets the custom colour background



Return value

This is a property. You can use it to find the current custom background colour.




See Also ...

Topics

DOC_colours Colour management
DOC_defaults Default triggers/aliases/timers/macros/colours

Functions

FNC_AdjustColour AdjustColour (Adjust an RGB colour)
FNC_ANSI ANSI (Generates an ANSI colour sequence)
FNC_BoldColour BoldColour (Gets/sets the RGB colour for one of the 8 ANSI bold colours)
FNC_ColourNameToRGB ColourNameToRGB (Converts a named colour to a RGB colour code.)
FNC_ColourNote ColourNote (Sends a message to the output window in specified colours)
FNC_ColourTell ColourTell (Sends a message to the output window in specified colours - not terminated by a newline)
FNC_CustomColourText CustomColourText (Sets the RGB value for the text of a custom colour)
FNC_GetCustomColourName GetCustomColourName (Gets the name of a custom colour)
FNC_GetMapColour GetMapColour (Returns the mapping for how a particular colour will be displayed)
FNC_MapColour MapColour (Changes the colour mapping - the way colours are displayed)
FNC_MapColourList MapColourList (Returns an array of all the mapped colours)
FNC_NormalColour NormalColour (Gets/sets the RGB colour for one of the 8 ANSI normal colours)
FNC_NoteColour NoteColour (Chooses which custom colour will be used for world notes.)
FNC_NoteColourBack NoteColourBack (Chooses which RGB colour will be used for world notes - background colour)
FNC_NoteColourFore NoteColourFore (Chooses which RGB colour will be used for world notes - text colour)
FNC_NoteColourName NoteColourName (Chooses which RGB colour name will be used for world notes - text and background)
FNC_NoteColourRGB NoteColourRGB (Chooses which RGB colour will be used for world notes - text and background)
FNC_PickColour PickColour (Invokes the MUSHclient colour picker dialog)
FNC_RGBColourToName RGBColourToName (Converts an RGB colour code to its equivalent name)
FNC_SetCustomColourName SetCustomColourName (Sets the name of a custom colour)

(Help topic: function=CustomColourBackground)

DOC_contents Documentation contents page