hiMatchColorByName
hiMatchColorByName(t_colorName) =>x_colormapIndex
Description
Returns a layer color index corresponding to the specified color name.
Argument
|
Specify the color name, such as |
Value Returned
|
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
Return to top