GetPaletteColors - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


ColorTools

  

GetPaletteColors

  

return all the colors in a palette

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

GetPaletteColors(N)

Parameters

N

-

string used to identify the palette, possibly with modifiers

Description

• 

The GetPaletteColors command returns a list of the colors in a Palette object associated with the name N (a string that is not case-sensitive).

• 

The name of the palette can be prefixed with modifiers to change the order in which the colors are returned

– 

"reverse PaletteName" returns the colors in reverse order

– 

"shifted PaletteName" returns the colors shifted by 50%

– 

"reverse shifted PaletteName" first shifts and then reverses

– 

"shifted reverse PaletteName" first reverses and then shifts

– 

"shifted[n]" shifts exactly nmodnops⁡N steps to the left if n is an integer

– 

"shifted[f]" shifts to the left by 100⁢f% if f is a floating point number

Examples

> 

with⁡ColorTools:

> 

GetPaletteColors⁡dalton

⟨RGB : Sky Blue⟩,⟨RGB : Vermillion⟩,⟨RGB : Yellow⟩,⟨RGB : Blue⟩,⟨RGB : Orange⟩,⟨RGB : Reddish Purple⟩,⟨RGB : Bluish Green⟩,⟨RGB : Pale Orange⟩,⟨RGB : Purple⟩,⟨RGB : Black⟩

(1)
> 

P≔Palette⁡Red=Color⁡#f00,Blue=Color⁡#00f,Green=Color⁡#0f0

P≔Palette:⁢Red⁢Blue⁢Green

(2)
> 

AddPalette⁡Primary,P

bright,dalton,executive,mono,nautical,niagara,oldplots,patchwork,spring,css,cvd,cvd2,cvd3,html,maplev,x11,resene,generic,xterm,solarized,xkcd,beersrm,inferno,magma,plasma,viridis,cividis,turbo,twilight,colorwheel,coolwarm,divergebjy,divergebkr,divergebky,divergebwy,divergegwv,divergerainbow,isocircle,isoluminant,labwheel,rainbow,hue,rgbwheel,primary

(3)
> 

GetPaletteColors⁡primary

⟨RGB : Red⟩,⟨RGB : Blue⟩,⟨RGB : Green⟩

(4)
> 

GetPaletteColors⁡reverse primary

⟨RGB : Green⟩,⟨RGB : Blue⟩,⟨RGB : Red⟩

(5)
> 

GetPaletteColors⁡shifted[1] primary

⟨RGB : Red⟩,⟨RGB : Blue⟩,⟨RGB : Green⟩

(6)
> 

GetPaletteColors⁡shifted[0.75] primary

⟨RGB : Green⟩,⟨RGB : Red⟩,⟨RGB : Blue⟩

(7)
> 

GetPaletteColors⁡shifted reverse css

⟨RGB : Aqua⟩,⟨RGB : Teal⟩,⟨RGB : Blue⟩,⟨RGB : Navy⟩,⟨RGB : Fuchsia⟩,⟨RGB : Purple⟩,⟨RGB : Gray⟩,⟨RGB : Silver⟩,⟨RGB : White⟩,⟨RGB : Black⟩,⟨RGB : Red⟩,⟨RGB : Maroon⟩,⟨RGB : Orange⟩,⟨RGB : Yellow⟩,⟨RGB : Olive⟩,⟨RGB : Lime⟩,⟨RGB : Green⟩

(8)

Compatibility

• 

The ColorTools[GetPaletteColors] command was introduced in Maple 2023.

• 

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

See Also

ColorTools[GetPalette]

ColorTools[PaletteNames]