RGB24ToName - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

ColorTools

  

RGB24ToName

  

look up color name by 24-bit color value

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

RGB24ToName(rgb,opts)

Parameters

rgb

-

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

opts

-

(optional) equation(s) of the form option=value where option is one of new or default

Options

• 

new = boolean : indicates whether to restrict to new color names (true), old color names (false), or no restriction (the default)

• 

default = string : default value to return when there is no match

Description

• 

The RGB24ToName procedure converts from RGB color values to a color name.

• 

The new option acts as follows:

new=true: only search new color names

new=false: only search old color names

default (option new not specified): search both new and old color names

• 

If a default value is provided, then that is returned when no match is found, otherwise an error occurs.

Examples

withColorTools:

RGB24ToName0,255,0

Lime

(1)

RGB24ToName0,255,0,new=false

green

(2)

RGB24ToName255,0,0

Red

(3)

RGB24ToNameI like cat videos

Error, invalid input: ColorTools:-RGB24ToName expects its 1st argument, rl, to be of type list(integer), but received I like cat videos

Compatibility

• 

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

• 

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

See Also

ColorTools

 


Download Help Document