ColorTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Packages : ColorTools : ColorTools/RGB24ToHex

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]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam