ColorTools[Palette] - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Packages : ColorTools : Palette Object Commands : ColorTools/Palette/KnownColor

ColorTools[Palette]

  

KnownColor

  

check if a string is a valid color name in a palette

 

Calling Sequence

Description

Examples

Compatibility

Calling Sequence

KnownColor(P,color)

Description

• 

The KnownColor command returns true if color is the name of a color in the palette P.  It is useful for avoiding the errors thrown by the Lookup command for colors not in a palette.

Examples

PColorTools:-GetPaletteCSS

PPalette CSS:BlackRedMaroonOrangeYellowOliveLimeGreenAquaTealBlueNavyFuchsiaPurpleGraySilverWhite

(1)

KnownColorP,Grey

true

(2)

KnownColorP,Gray

true

(3)

KnownColorP,Griy

false

(4)

An error will be thrown if a color is not in a palette

LookupP,Griy

Error, (in ColorTools:-Palette:-Lookup) invalid color Griy is not defined in this palette

Compatibility

• 

The ColorTools[Palette][KnownColor] command was introduced in Maple 16.

• 

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

See Also

ColorTools[Palette][Lookup]