world.NoteColourName

MUSHclient script function (Method)

Chooses which RGB colour name will be used for world notes - text and background

Prototype

void NoteColourName(BSTR Foreground, BSTR Background);

Data type meanings

Description

You can use this to set the foreground (text) and background colours used in world.note and world.tell. The colour is specified as a colour name, eg. "red", "green", "beige", "cyan" and so on.

The names are not case-sensitive.

You can also use HTML colour codes, eg. "#7FFF00", in this case the colours are in the order #rrggbb (rr = red, gg = green, bb = blue).

If a particular colour is invalid or not found, then that colour will be unchanged. Thus you can use this function to change the foreground colour only, the background colour only, or both.

Eg.

world.notecolourname "red", "" ' foreground only
world.notecolourname "", "blue" ' background only
world.notecolourname "green", "cyan" ' both

You can use MUSHclient's "colour picker" to choose a suitable name. Use the Edit menu -> Colour Picker to do this, or press Ctrl+Alt+P.

VBscript example

world.notecolourname "red", "green"  ' set note colour to red on green
world.note "This will be in red on green"

Jscript example

world.notecolourname ("red", "green");  // set note colour to use red on green
world.note("This will be in red on green");

PerlScript example

$world->NoteColourname ("red", "green");  # set note colour to use red on green
$world->note("This will be in red on green");

Python example

world.notecolourname ("red", "green")  # set note colour to use red on green
world.note("This will be in red on green")

Lua example

NoteColourName ("red", "green")  -- set note colour to use red on green
Note("This will be in red on green")

Return value

Nothing.

Related topic

Colour management

See also

FunctionDescription
ColourNoteSends a message to the output window in specified colours
ColourTellSends a message to the output window in specified colours - not terminated by a newline
NoteSends a note to the output window
NoteColourChooses which custom colour will be used for world notes.
NoteColourBackChooses which RGB colour will be used for world notes - background colour
NoteColourForeChooses which RGB colour will be used for world notes - text colour
NoteColourRGBChooses which RGB colour will be used for world notes - text and background
TellSends a message to the output window - not terminated by a newline