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

hiMatchColorByName

hiMatchColorByName(  
t_colorName 
) 
=> x_colormapIndex 

Description

Returns a layer color index corresponding to the specified color name.

Argument

t_colorname

Specify the color name, such as red or green or an RGB string, such as #ff0000 (red) or #00ff00 (green).

Value Returned

x_colormapIndex

Returns a layer color index if the color name is valid. Otherwise, a warning a message is displayed and the index of the editor background color is returned.

Examples

Returns the layer color index for the color, red.

hiMatchColorByName("red")
=> 6 20

Returns the layer color index for the RGB string, #ff0000.

hiMatchColorByName("#ff0000")
=> 8 20

Returns the warning message because the color name is not valid.

hiMatchColorByName("bad name")
=> 10 *WARNING* nameToColor: could not parse color string "bad name"
=> 11 *WARNING* hiMatchColorByName: defaulting to editor background color for color name "bad name"

Related Topics

Icon Functions

hiStringToIcon

hiSetDisabledIcon


Return to top
 ⠀
X