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

# Online Help

###### All Products    Maple    MapleSim

ColorTools

 KnownPalette
 check whether a string is the name of a known palette

 Calling Sequence KnownPalette(N)

Parameters

 N - string used to identify the palette

Description

 • The KnownPalette command returns true if and only if N is the name of a known palette. The string is not case-sensitive.

Examples

 > $\mathrm{with}\left(\mathrm{ColorTools}\right):$
 > $P≔\mathrm{Palette}\left(\left["Red"=\mathrm{Color}\left("#f00"\right),"Blue"=\mathrm{Color}\left("#00f"\right),"Green"=\mathrm{Color}\left("#0f0"\right)\right]\right)$
 ${P}{≔}⟨{Palette:}{}\colorbox[rgb]{1,0,0}{{Red}}{}\colorbox[rgb]{0,0,1}{{Blue}}{}\colorbox[rgb]{0,1,0}{Green}⟩$ (1)
 > $\mathrm{AddPalette}\left("Primary",P\right)$
 $\left[{"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"}{,}{"rainbow"}{,}{"primary"}\right]$ (2)
 > $\mathrm{KnownPalette}\left("primary"\right)$
 ${\mathrm{true}}$ (3)
 > $\mathrm{KnownPalette}\left("Primary"\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{KnownPalette}\left("Prim ary"\right)$
 ${\mathrm{false}}$ (5)

Compatibility

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

 See Also