RGB24ToHex - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


ColorTools

  

RGB24ToHex

  

convert RGB values to a hex code

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

RGB24ToHex(rgb)

RGB24ToHex(rgb, omitoctothorpe)

Parameters

rgb

-

list; [r,g,b] color values, integer values 0-255

Options

• 

omitoctothorpe : if this keyword is included, then an octothorpe (#) is not prepended to the output string.

Description

• 

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.

Examples

withColorTools:

RGB24ToHex0,255,0

#00FF00

(1)

RGB24ToHexHexToRGB24#badcab,omitoctothorpe

BADCAB

(2)

Compatibility

• 

The ColorTools[RGB24ToHex] command was introduced in Maple 16.

• 

For more information on Maple 16 changes, see Updates in Maple 16.

See Also

ColorTools

ColorTools[HexToRGB24]