Xbasic
convert_color_name_to_hex Function
Syntax
convert_color_name_to_hex as c (name as c)
Arguments
- nameCharacter
The color name to convert. If <showcolors> is specified as the name, a list of color names is returned.
Returns
- ResultCharacter
Returns the hexadecimal value for the specified color. Returns a list of colors if <showcolors> was specified.
Description
Converts a color name to a hex value.
Discussion
The convert_color_name_to_hex() function returns the hexadecimal value for a named color.
? convert_color_name_to_hex("oldlace") = "#fdf5e6"
To get a list of supported colors, call the function with <showcolors> specified as the name argument. For example:
? convert_color_name_to_hex("<showcolors>") = aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown ...