Spring Color Palette - Maple Programming Help

Home : Support : Online Help : Graphics : Packages : ColorTools : Color Collections : ColorTools/Collection/Spring

Spring Color Palette

Description

 • The Spring plot palette is a bright selection of colors chosen to evoke the flowering plants of spring. It is designed for coloring collections of lines. There are six main colors in the palette as well as ten more named colors.
 > ColorTools:-DisplayPalette("Spring",noextend);

 1. Blue 2. Rose 3. YellowGreen 4. BlueGreen 5. Violet 6. Cobalt 7. Yellow 8. PurpleRed 9. GreenBlue 10. PaleGreen 11. Orange 12. Purple 13. Green 14. SeaBlue 15. PaleYellow 16. PaleBlueGreen

Examples

You can reference colors in the palette by name or number in most commands that understand color names.

 > $\mathrm{plot}\left(\left[x,{x}^{3}\right],x=-1..1,\mathrm{color}=\left["Spring 2","Spring Blue"\right]\right)$
 > $C≔\mathrm{ColorTools}:-\mathrm{Color}\left("Spring 10"\right)$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.29411765}{,}{0.65098039}{,}{0.45098039}\right]\right)$ (1)

You can make Spring the default palette in plots using setcolors

 > $\mathrm{plots}:-\mathrm{setcolors}\left("Spring"\right):$

You can programatically access the colors using ColorTools commands

 > $P≔\mathrm{ColorTools}:-\mathrm{GetPalette}\left("Spring"\right)$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Palette}}{}\left(\left[{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}{,}{\mathbf{module}}\left({}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{...}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end module}}\right]{,}\left[{"Blue"}{,}{"Rose"}{,}{"YellowGreen"}{,}{"BlueGreen"}{,}{"Violet"}{,}{"Cobalt"}{,}{"Yellow"}{,}{"PurpleRed"}{,}{"GreenBlue"}{,}{"PaleGreen"}{,}{"Orange"}{,}{"Purple"}{,}{"Green"}{,}{"SeaBlue"}{,}{"PaleYellow"}{,}{"PaleBlueGreen"}\right]{,}\left[{}\right]{,}{\mathrm{palettename}}{=}{"Spring"}{,}{\mathrm{palettetype}}{=}{"line"}\right)$ (2)
 > $P\left[1\right]$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.}{,}{0.45490196}{,}{0.80000000}\right]{,}{\mathrm{caption}}{=}{"Blue"}\right)$ (3)
 > $n≔\mathrm{numcolors}\left(P\right)$
 ${n}{≔}{16}$ (4)
 > $\mathrm{plot}\left(\left[\mathrm{seq}\left(\mathrm{sin}\left(x+\frac{i\mathrm{\pi }}{n}\right),i=1..n\right)\right],x=0..2\mathrm{\pi },\mathrm{axes}=\mathrm{boxed},\mathrm{color}=:-\mathrm{GetColors}\left(P\right)\left[1..n\right],\mathrm{legend}=:-\mathrm{GetColorNames}\left(P\right)\left[1..n\right],\mathrm{numpoints}=25,\mathrm{style}=\mathrm{line}\right)$

ColorTools algorithms will automatically generate new colors beyond the main 16 colors:

 > $P\left[20\right]$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.2540132007}{,}{0.4205257299}{,}{0.3192775001}\right]\right)$ (5)

The Spring palette is designed for lines, but the Lookup command can provide slightly altered shades of its colors for use in coloring points or filling regions.

 > $\mathrm{Lookup}\left(P,1,\mathrm{shade}="fill"\right)$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.29014866}{,}{0.52206964}{,}{0.82975350}\right]\right)$ (6)
 > $\mathrm{Lookup}\left(P,1,\mathrm{shade}="point"\right)$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.046919402}{,}{0.43784410}{,}{0.76624204}\right]\right)$ (7)
 >