Dalton - Maple Help

Dalton Color Palette

Description

 • The Dalton plot palette is a selection of colors to be more easily distinguishable for viewers with red-green color blindness. It is designed for coloring filled areas. There are seven colors in the palette.
 > ColorTools:-DisplayPalette("Dalton",noextend);

 1. SkyBlue 2. Vermillion 3. Yellow 4. Blue 5. Orange 6. ReddishPurple 7. BluishGreen

 • The CVD palettes are also designed with color blindness in mind. For more information, including palettes designed for viewers with all types of color defective vision, see CVD Color Palette.

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["Dalton 2","Dalton Blue"\right]\right)$
 > $C≔\mathrm{ColorTools}:-\mathrm{Color}\left("Dalton 5"\right)$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.90196078}{,}{0.62352941}{,}{0.}\right]\right)$ (1)

You can make Dalton the default palette in plots using setcolors

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

You can programmatically access the colors using ColorTools commands

 > $P≔\mathrm{ColorTools}:-\mathrm{GetPalette}\left("Dalton"\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}}\right]{,}\left[{"SkyBlue"}{,}{"Vermillion"}{,}{"Yellow"}{,}{"Blue"}{,}{"Orange"}{,}{"ReddishPurple"}{,}{"BluishGreen"}\right]{,}\left[{}\right]{,}{\mathrm{palettename}}{=}{"Dalton"}{,}{\mathrm{palettetype}}{=}{"fill"}\right)$ (2)
 > $P\left[1\right]$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.33725490}{,}{0.70588235}{,}{0.91372549}\right]{,}{\mathrm{caption}}{=}{"Sky Blue"}\right)$ (3)
 > $n≔\mathrm{numcolors}\left(P\right)$
 ${n}{≔}{7}$ (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 7 colors.  Extended colors are algorithmically generated and should also attemp to be well distributed for red-green color blind viewers.

 > $P\left[10\right]$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.1216480102}{,}{0.2500747801}{,}{0.3678495298}\right]\right)$ (5)

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

 > $\mathrm{Lookup}\left(P,1,\mathrm{shade}="line"\right)$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.}{,}{0.64170173}{,}{0.87877048}\right]\right)$ (6)
 > $\mathrm{Lookup}\left(P,1,\mathrm{shade}="point"\right)$
 ${\mathrm{ColorTools}}{:-}{\mathrm{Color}}{}\left({"RGB"}{,}\left[{0.}{,}{0.60534933}{,}{0.83050246}\right]\right)$ (7)
 >