construct a palette data structure - Maple Help

Online Help

All Products    Maple    MapleSim

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

ColorTools[Palette] - construct a palette data structure

Calling Sequence


Palette(colors, palettetype=type )




list of colors in formats recognized by ColorTools, or a list of equations of the form string=color.



type of palette given as a string. Choices are dictionary, fill, line, and point. A dictionary palette is intended to store an association of colors and names. The other palette types specify a collection of colors intended for use in plotted figures of the given type. In general, darker, more saturated colors are better for points and lines while lighter, less saturated colors are better for fills.



A palette data structure is an object that stores a collection of named colors in a specified order.


If names are not specified for the colors in the palette, names will be created using the ColorDescription command.


The palette structure is primarily used to register new collections of colors using the AddPalette command.


As stand-alone objects, palettes recognize the indexing operator [] and can be indexed as if they were lists (using integer indices) or tables (using color name strings). As long as the palette type is not set to dictionary, when indexed using a higher number than the number of colors specified in the definition, the palette will automatically be extended using the ExpandPalette command.




grays:=Palette:BlackDark GrayDark Gray 2Dark Gray 3GrayGray 2Gray 3Light GrayLight Gray 2Light Gray 3White



RGB : Dark Gray



RGB : Light Gray,RGB : Light Gray 2,RGB : Light Gray 3



RGB : Black,RGB : Dark Gray,RGB : Dark Gray 2,RGB : Dark Gray 3,RGB : Gray,RGB : Gray 2,RGB : Gray 3,RGB : Light Gray,RGB : Light Gray 2,RGB : Light Gray 3,RGB : White






RGB : Red



Automatic transformations of colors may be done on non-dictionary palettes.


RGB : 0.806 0.176 0.0894


Non-dictionary palettes can be automatically expanded.


RGB : Red,RGB : Blue,RGB : Green,RGB : 1 0 1,RGB : 0 1 1


Palettes cannot be empty.


Error, (in ColorTools:-Palette:-ModuleCopy) a palette must be constructed with at least one color

See Also

ColorTools, ColorTools/ColorSpaces, ColorTools[AddPalette], ColorTools[Color]

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