hiSetTextHighlightColor
hiSetTextHighlightColor(x_class l_foreground l_background) =>t / nil
Description
Sets the foreground and background highlight colors of a class to the specified RGB value.
The range of the class is from 1 through 25. Only classes 1 through 10 are initialized at startup. Whenever a class number is used from 11 through 25 that has not had its color initialized with this function, the highlight color will be the same as for class 0. Since 25 is the highest class number that can have a unique color combination assigned, any class above 25 will always use the same highlight color as for class 0.
The colors can be specified either as RGB values with ranges from 0 to 1000 or as the return value of nameToColor, which translates the predefined color (as contained in the server’s rgb.txt file) into its corresponding RGB values. For example, the following command highlights class 5 with white as the foreground color and navy as the background color.
hiSetTextHighlightColor(5 nameToColor("white") nameToColor("navy"))
Following are the default settings for classes 1 through 10. Class 0 uses the background color as the foreground (text) color and the text (foreground) color as the background color for selections:
| Class | Foreground | Background |
|---|---|---|
Arguments
|
Class number for selection. Valid range is 1 through 25. Zero is the default value and uses the window inverse color. |
|
Values Returned
|
x_class is smaller than one or greater than 25, or the RGB value of the foreground and background color is not within the range of 0 to 1000. A warning is also issued. |
Related Topics
Return to top