ColorTools
RGB24ToHex
convert RGB values to a hex code
Calling Sequence
Parameters
Options
Description
Examples
Compatibility
RGB24ToHex(rgb)
RGB24ToHex(rgb, omitoctothorpe)
rgb
-
list; [r,g,b] color values, integer values 0-255
omitoctothorpe : if this keyword is included, then an octothorpe (#) is not prepended to the output string.
The RGB24ToHex procedure converts from RGB values to a hex code. If the input is not a valid list of RGB values, an error occurs.
The value returned is a six-digit hex code for color in the form "#rrggbb" or "rrggbb" using numbers and uppercase letters.
with⁡ColorTools:
RGB24ToHex⁡0,255,0
#00FF00
RGB24ToHex⁡HexToRGB24⁡#badcab,omitoctothorpe
BADCAB
The ColorTools[RGB24ToHex] command was introduced in Maple 16.
For more information on Maple 16 changes, see Updates in Maple 16.
See Also
ColorTools[HexToRGB24]
Download Help Document