CVD Color Palette
Description
Examples
References
The CVD plot palette is a selection of colors to be more easily distinguishable for viewers with all types of color defective vision (color blindness). It is designed for coloring filled areas. There are twelve colors in the palette, all of which should be distinguishable by viewers with deuteranopia and protanopia. The first nine should be distinguishable by viewers with tritanopia.
ColorTools:-DisplayPalette("CVD",noextend);
1. Blue
2. Orange
3. Pale Green
4. Purple
5. Yellow
6. Red
7. Light Blue
8. Pale Purple
9. Green
10. Green Blue
11. Pale Orange
12. Light Green Blue
Two variations of this palette are provided and named CVD2 and CVD3 that are optimized for protanopia and tritanopia respectively. They have the same initial colors, but will produce different colors when automatically extended.
You can reference colors in the palette by name or number in most commands that understand color names.
plot⁡x,x3,x=−1..1,color=CVD 2,CVD Blue
C≔ColorTools:-Color⁡CVD 5
C≔〈RGB : 0.941 0.941 0.196〉
You can make CVD the default palette in plots using setcolors
plots:-setcolors⁡CVD:
You can programmatically access the colors using ColorTools commands
P≔ColorTools:-GetPalette⁡CVD
P≔Palette CVD:⁢Blue⁢Orange⁢Pale Green⁢Purple⁢Yellow⁢Red⁢Light Blue⁢Pale Purple⁢Green⁢Green Blue⁢Pale Orange⁢Light Green Blue
P1
〈RGB : Blue〉
n≔numcolors⁡P
n≔12
plot⁡seq⁡sin⁡x+i⁢πn,i=1..n,x=0..2⁢π,axes=boxed,color=:-GetColors⁡P1..n,legend=:-GetColorNames⁡P1..n,numpoints=25,style=line
ColorTools algorithms will automatically generate new colors beyond the main 12 colors. Extended colors are algorithmically generated and will attempt to be well distributed for red-green color blind viewers.
P16
〈RGB : 0.125 0 0.165〉
The CVD 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.
Lookup⁡P,1,shade=line
〈RGB : -0.00102 0.234 0.618〉
Lookup⁡P,1,shade=point
〈RGB : -0.00161 0.155 0.558〉
http://mkweb.bcgsc.ca/colorblind/
See Also
ColorTools
ColorTools[DisplayPalette]
ColorTools[Palette]
ColorTools[Palettes][Lookup]
plots[setcolors]
Download Help Document