Register forum user name Search FAQ

AdjustColour

Script function

world.AdjustColour

Read about scripting

Type

Method

Summary

Adjust an RGB colour

Prototype

long AdjustColour(long Colour, short Method);

View list of data type meanings

Description

This lets you play with colours in a script. You pass to it a colour and an adjustment method. The methods are:

1: invert
2: lighter
3: darker
4: less colour
5: more colour

This lets you do in a script what can be done on the ANSI colour page - fiddle with colour values.


Available in MUSHclient version 3.41 onwards.



VBscript example

mycolour = world.AdjustColour (ColourNameToRGB ("red"), 1) ' get inverse of red


Jscript example

mycolour = AdjustColour (ColourNameToRGB ("red"), 1); // get inverse of red


PerlScript example

mycolour = AdjustColour (ColourNameToRGB ("red"), 1); # get inverse of red


Python example

mycolour = world.AdjustColour (world.ColourNameToRGB ("red"), 1) # get inverse of red


Lua example

mycolour = AdjustColour (ColourNameToRGB ("red"), 1) -- get inverse of red


Return value

The RGB code of the adjusted colour. If the method is out of range the original colour is returned.


See Also ...

Topics

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

Functions

(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
(NormalColour) Gets/sets the RGB colour for one of the 8 ANSI normal 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
(RGBColourToName) Converts an RGB colour code to its equivalent name
(SetCustomColourName) Sets the name of a custom colour

(Help topic: function=AdjustColour)

Documentation contents page


Search ...

Enter a search string to find matching documentation.

Search for:   

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