Register forum user name Search FAQ

MUSHclient scripting

Description of MUSHclient world function: world.NoteColourRGB


Name NoteColourRGB
Type Method
Summary Chooses which RGB colour will be used for world notes - text and background
Prototype void NoteColourRGB(long Foreground, long Background);
Description

You can use this to set the foreground (text) and background colours used in world.note and world.tell. The colour is specified in RGB (Red, Green, Blue). Red is in the low-order byte, Green in the middle-order byte, and Blue in the higher-order byte. (ie. 0x00BBGGRR).

You must specify an RGB values. 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 and PerlScript you will need to use the RGB values, for example Magenta would be: 0xFF00FF.

To calculate this mathematically this would be:

colour = red + (green * 256) + (blue * 65536)

VBscript example
world.notecolourRGB vbRed, vbGreen  ' set note colour to red on green
world.note "This will be in red on green"
Jscript example
world.notecolourRGB (0xFF, 0xFF00);  // set note colour to use red on green
world.note("This will be in red on green");
PerlScript example
$world->NoteColourRGB (0xFF, 0xFF00);  # set note colour to use red on green
$world->note("This will be in red on green");
Python example
world.notecolourRGB (0xFF, 0xFF00)  # set note colour to use red on green
world.note("This will be in red on green")
Lua example
NoteColourRGB (255, 256 * 255)  -- set note colour to use red on green
Note("This will be in red on green")
Returns Nothing.

See also ...

Function Description
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
Note Sends a note to the output window
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
Tell Sends a message to the output window - not terminated by a newline

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.