Product Documentation
Cadence User Interface SKILL Reference
Product Version IC23.1, September 2023

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

Number

Color

Color

1

white

green

2

white

red

3

yellow

navy

4

red

yellow

5

white

blue

6

white

violet

7

black

turquoise

8

yellow

orange

9

yellow

magenta

10

white

black

Arguments

x_class

Class number for selection. Valid range is 1 through 25. Zero is the default value and uses the window inverse color.

l_foreground

Color for foreground.

l_background

Color for background.

Values Returned

t

The classes have been set.

nil

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

Functions of Viewfile Window

Text Customization Functions


Return to top
 ⠀
X