Colour picker
This dialog box provides a handy colour picker, to help choose colours for triggers, scripting, MXP programming, and generally throughout the program.

Colour list

This shows all of the internal colours, sorted into various sequences (controlled by the Sort combo-box). The default is Hue, which groups related colours (eg. the reds come together).

Underneath that is the currently-selected colour's name, which you can click on to copy it to the clipboard, and close the colour picker dialog box. If this box is blank, then the current colour does not have a matching name.

Select a colour in the list by clicking on the colour name or the colour swatch.

Colour buttons

If you click on any of the buttons mentioned below, it will copy the value to the clipboard, and then close the colour picker. This lets you choose a colour, and have it copied to the clipboard in the format of your choice, in one click.

MXP:

This is the selected colour code in MXP/HTML format (eg. for use in an MXP-enabled MUD, or on a web page). eg. #E9967A

VB:

This is the selected colour code in Visual Basic hex format (eg. for use in a VBscript program). eg. &h7A96E9

JScript:

This is the selected colour code in C format (eg. for use in a C program, Perlscript or Jscript). eg. 0x7A96E9

Lua:

This is the selected colour code as a straight decimal number (eg. for use in a Lua program, or any program that does not support hex codes). eg. 8034025

Colour sliders

The three colour sliders (red/green/blue) can be moved by clicking and dragging, which will change the component of the selected colour.

Also, once the slider is selected you can use the arrow keys to increase/decrease the component by one. Pressing PageUp or PageDown to increase/decrease the component by ten.

As you move the sliders the colour swatch will be updated to show the new colour. Also the colour codes in the various windows will also be updated. If the new colour matches a known colour name that will appear in the "Name" box.

Red:

The red component of the selected colour, in the range 0 to 255.

Green:

The green component of the selected colour, in the range 0 to 255.

Blue:

The blue component of the selected colour, in the range 0 to 255.

Hue:

The hue component of the selected colour.

Saturation:

The saturation component of the selected colour.

Luminance:

The saturation component of the selected colour.

Sort:

The sequence for sorting the colours in the colour list.

Colour swatch

The colour swatch shows the currently-selected colour.

Click on it to open the Windows colour picker. You can use the Windows colour picker to adjust the luminance (with the slider bar), the saturation (by clicking further up or down in the colour window), or the hue (by clicking further left or right in the colour window).

OK

Select the colour of your choice, and close the dialog box (this is the default action if you press Enter).

Random

Change the colour to one chosen at random.

Other colour...

Open the standard Windows colour picker for further colour selection. As described above you can use this to change the luminance, saturation and hue of the selected colour.

Paste

If there is a valid MXP/HTML/VB/C/Lua colour on the clipboard, this button will be active. Clicking it will paste the colour code into the window, and the various boxes will adjust accordingly.

Close

Close the colour picker without selecting a colour. This is the action that occurs if you press Escape.


See Also ...

Topics

DOC_scripting Scripting
DOC_utils Utilities

Command

CMD_ID_EDIT_COLOURPICKER ColourPicker (Choose a colour from a list)

Dialog

DLG_IDD_PREFS_P5 ANSI Colour

Functions

FNC_Base64Decode Base64Decode (Takes a base-64 encoded string and decodes it.)
FNC_Base64Encode Base64Encode (Encodes a string using base-64 encoding.)
FNC_ChangeDir ChangeDir (Changes the MUSHclient working directory)
FNC_CreateGUID CreateGUID (Creates a GUID - Global Unique Identifier)
FNC_EditDistance EditDistance (Returns the Levenshtein Edit Distance between two words)
FNC_ErrorDesc ErrorDesc (Converts a MUSHclient script error code into an human-readable description)
FNC_ExportXML ExportXML (Exports a world item in XML format)
FNC_FixupEscapeSequences FixupEscapeSequences (Converts "escape sequences" like \t to their equivalent codes.)
FNC_FixupHTML FixupHTML (Fixes up text for writing as HTML)
FNC_GenerateName GenerateName (Generates a random character name)
FNC_GetClipboard GetClipboard (Gets the clipboard contents)
FNC_GetScriptTime GetScriptTime (Returns the amount of time spent in script routines)
FNC_GetUniqueID GetUniqueID (Creates a unique ID for general use, or for making Plugin IDs)
FNC_GetUniqueNumber GetUniqueNumber (Returns a unique number)
FNC_Hash Hash (Produces a hash (checksum) of a specified piece of text)
FNC_Help Help (Shows help for a script function, or a list of functions)
FNC_ImportXML ImportXML (Imports configuration data in XML format)
FNC_Metaphone Metaphone (Returns the metaphone code for the supplied word)
FNC_MtRand MtRand (Returns pseudo-random number using the Mersenne Twister algorithm)
FNC_MtSrand MtSrand (Seed the Mersenne Twister pseudo-random number generator)
FNC_ReadNamesFile ReadNamesFile (Loads in a file for generating character names)
FNC_Replace Replace (Replaces one substring with another)
FNC_SetClipboard SetClipboard (Sets the clipboard contents)
FNC_SetStatus SetStatus (Sets the status line text)
FNC_Simulate Simulate (Simulate input from the MUD, for debugging purposes)
FNC_Sound Sound (Plays a sound)
FNC_StripANSI StripANSI (Strips ANSI colour sequences from a string)
FNC_Trace Trace (Trace mode property)
FNC_TraceOut TraceOut (Outputs the supplied message to the world Trace)
FNC_TranslateGerman TranslateGerman (Translate German umluat sequences)
FNC_Transparency Transparency (Sets the transparency of the main MUSHclient window under Windows XP)
FNC_Trim Trim (Trims leading and trailing spaces from a string)

(Help topic: dialog=IDD_COLOUR_PICKER)

DOC_contents Documentation contents page