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

Online Help

ColorTools

  

AddPalette

  

register a color palette

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

AddPalette(N, P)

Parameters

N

-

string to be used to identify the palette

P

-

Palette object created with ColorTools:-Palette

Description

• 

The AddPalette command registers the palette P with the name N so that it will be usable by all ColorTools commands.  The string N must contain only alphanumeric characters.  It will be stored in lowercase but the capitalization will be preserved.

• 

It returns a list of the normalized names of all the known palettes after the addition.

Examples

with(ColorTools):

P := Palette(["Red"=Color("#f00"), "Blue"=Color("#00f"), "Green"=Color("#0f0")]);

(1)

AddPalette("Primary", P);

(2)

NameToRGB24("Primary Green");

(3)

NearestNamedColor([0,255,0], palette="Primary");

(4)

RemovePalette("Primary");

(5)

Compatibility

• 

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

• 

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

See Also

ColorTools[NameToRGB24]

ColorTools[NearestNamedColor]

ColorTools[Palette]

ColorTools[RemovePalette]

 


Download Help Document