nameToColor
nameToColor(S_colorName) =>l_RGBColor /nil
Description
Specifies the color name as string or symbol.
This function returns a list of three integers representing the red, green, and blue (RGB) components of the color in Virtuoso color coordinates (ranging from 0 to 1000, as opposed to the standard RGB coordinates that range from 0 to 255).
Argument
Values Returned
Examples
Returns the list of RGB values for the color, red.
nameToColor("red")
=> (1000 0 0)
Returns the list of RGB values for the color, blue.
nameToColor("blue")
=> (0 0 1000)
Returns the list of RGB values for the color symbol, #ff0000.
nameToColor("#ff0000")
=> (1000 0 0)
Returns nil and displays the warning message because the color name is not valid.
nameToColor("seafoam")
=> *WARNING* nameToColor: could not parse color string "seafoam"
=> nil
Returns the list of RGB values for the color, seagreen.
nameToColor("seagreen")
=> (180 545 341)
Related Topics
Return to top