GetColors - Maple Help

ColorTools[Palette]

 GetColors
 retrieve colors from a Palette object

 Calling Sequence GetColors(P) GetColors(P,all=bool)

Parameters

 P - Palette object created with ColorTools:-Palette all - (optional) keyword option

Description

 • The GetColors command returns all displayable colors in the Palette P as a list of Color objects.
 • By specifying all, the command returns all colors including the ones that are not displayable.

Examples

 > $P≔\mathrm{ColorTools}:-\mathrm{GetPalette}\left("Niagara"\right)$
 ${P}{≔}⟨{Palette Niagara:}{}\colorbox[rgb]{0.470588235294118,0,0.0549019607843137}{{Burgundy}}{}\colorbox[rgb]{0,0.0549019607843137,0.470588235294118}{{Navy}}{}\colorbox[rgb]{0.290196078431373,0.470588235294118,0}{{LeafGreen}}{}\colorbox[rgb]{0.243137254901961,0.341176470588235,0.541176470588235}{{Azure}}{}\colorbox[rgb]{0.470588235294118,0,0.447058823529412}{{Purple}}{}\colorbox[rgb]{0,0.470588235294118,0.415686274509804}{{BlueGreen}}{}\colorbox[rgb]{0.376470588235294,0.254901960784314,0.568627450980392}{{Violet}}{}\colorbox[rgb]{0,0.290196078431373,0.470588235294118}{{DeepBlue}}{}\colorbox[rgb]{0.470588235294118,0.298039215686275,0}{{Cinnamon}}{}\colorbox[rgb]{0.568627450980392,0.254901960784314,0.290196078431373}{{PaleRed}}{}\colorbox[rgb]{0.243137254901961,0.450980392156863,0.541176470588235}{{GreenishBlue}}{}\colorbox[rgb]{0.470588235294118,0,0.231372549019608}{{DarkRose}}{}\colorbox[rgb]{0,0.470588235294118,0.247058823529412}{{BluishGreen}}{}\colorbox[rgb]{0.568627450980392,0.254901960784314,0.525490196078431}{{DarkOrchid}}{}\colorbox[rgb]{0.317647058823529,0,0.470588235294118}{{BluishPurple}}{}\colorbox[rgb]{0.466666666666667,0.470588235294118,0}{Olive}⟩$ (1)
 > $\mathrm{GetColors}\left(P\right)$
 $\left[{⟨}\colorbox[rgb]{0.470588235294118,0,0.0549019607843137}{{RGB : Burgundy}}{⟩}{,}{⟨}\colorbox[rgb]{0,0.0549019607843137,0.470588235294118}{{RGB : Navy}}{⟩}{,}{⟨}\colorbox[rgb]{0.290196078431373,0.470588235294118,0}{{RGB : Leaf Green}}{⟩}{,}{⟨}\colorbox[rgb]{0.243137254901961,0.341176470588235,0.541176470588235}{{RGB : Azure}}{⟩}{,}{⟨}\colorbox[rgb]{0.470588235294118,0,0.447058823529412}{{RGB : Purple}}{⟩}{,}{⟨}\colorbox[rgb]{0,0.470588235294118,0.415686274509804}{{RGB : Blue Green}}{⟩}{,}{⟨}\colorbox[rgb]{0.376470588235294,0.254901960784314,0.568627450980392}{{RGB : Violet}}{⟩}{,}{⟨}\colorbox[rgb]{0,0.290196078431373,0.470588235294118}{{RGB : Deep Blue}}{⟩}{,}{⟨}\colorbox[rgb]{0.470588235294118,0.298039215686275,0}{{RGB : Cinnamon}}{⟩}{,}{⟨}\colorbox[rgb]{0.568627450980392,0.254901960784314,0.290196078431373}{{RGB : Pale Red}}{⟩}{,}{⟨}\colorbox[rgb]{0.243137254901961,0.450980392156863,0.541176470588235}{{RGB : Greenish Blue}}{⟩}{,}{⟨}\colorbox[rgb]{0.470588235294118,0,0.231372549019608}{{RGB : Dark Rose}}{⟩}{,}{⟨}\colorbox[rgb]{0,0.470588235294118,0.247058823529412}{{RGB : Bluish Green}}{⟩}{,}{⟨}\colorbox[rgb]{0.568627450980392,0.254901960784314,0.525490196078431}{{RGB : Dark Orchid}}{⟩}{,}{⟨}\colorbox[rgb]{0.317647058823529,0,0.470588235294118}{{RGB : Bluish Purple}}{⟩}{,}{⟨}\colorbox[rgb]{0.466666666666667,0.470588235294118,0}{RGB : Olive}{⟩}\right]$ (2)
 > $\mathrm{P2}≔\mathrm{ColorTools}:-\mathrm{Palette}\left(\left["Red","Green","Blue",\mathrm{ColorTools}:-\mathrm{Color}\left(\left[0.293,-0.128,0.132\right]\right)\right]\right)$
 ${\mathrm{P2}}{≔}⟨{Palette:}{}\colorbox[rgb]{1,0,0}{{Red}}{}\colorbox[rgb]{0,0.501960784313725,0}{{Green}}{}\colorbox[rgb]{0,0,1}{{Blue}}{}\colorbox[rgb]{0.309803921568627,0,0.172549019607843}{{Dark Red Purple}}⟩$ (3)
 > $\mathrm{GetColors}\left(\mathrm{P2}\right)$
 $\left[{⟨}\colorbox[rgb]{1,0,0}{{RGB : Red}}{⟩}{,}{⟨}\colorbox[rgb]{0,0.501960784313725,0}{{RGB : Green}}{⟩}{,}{⟨}\colorbox[rgb]{0,0,1}{{RGB : Blue}}{⟩}\right]$ (4)
 > $\mathrm{GetColors}\left(\mathrm{P2},'\mathrm{all}'\right)$
 $\left[{⟨}\colorbox[rgb]{1,0,0}{{RGB : Red}}{⟩}{,}{⟨}\colorbox[rgb]{0,0.501960784313725,0}{{RGB : Green}}{⟩}{,}{⟨}\colorbox[rgb]{0,0,1}{{RGB : Blue}}{⟩}{,}{⟨}\colorbox[rgb]{0.309803921568627,0,0.172549019607843}{{*RGB* : Dark Red Purple}}{⟩}\right]$ (5)

Compatibility

 • The ColorTools[Palette][GetColors] command was introduced in Maple 16.
 • For more information on Maple 16 changes, see Updates in Maple 16.