look up color name by hex string - Maple Help

Online Help

All Products    Maple    MapleSim


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

ColorTools[HexToString] - look up color name by hex string

Calling Sequence

HexToString(hex)

Parameters

hex

-

:string: : hex code for color, can be "#rrggbb" or "rrggbb"

Description

• 

The HexToString procedure converts from a hex color value to a translated color name (based upon the current locale in the Maplets context).

• 

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:

HexToString#00FF00

Lime

(1)

HexToString#0F0,new=false

green

(2)

HexToStringFF0000

Red

(3)

HexToStringF00

Red

(4)

HexToStringI like cat videos

Error, (in ColorTools:-HexToString) invalid hex color value: I like cat videos

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