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

ColorTools

 CVDSimulation
 simulate color vision deficiency (CVD)

 Calling Sequence CVDSimulation(color) CVDSimulation(color, cvdtype, severity, raw)

Parameters

 color - color format recognized by ColorTools cvdtype - (optional) string specifying the type of CVD to model. One of "deuteranomaly" (default), "protanomaly", or "tritanomaly". Prefixes of any of the types as short as three characters are also accepted. severity - number between 0 and 100 specifying the severity of the CVD. raw - (optional) truefalse; if given, the result will not be converted to a displayable color before it is returned.

Description

 • Using the model of Machado, Oliveira, & Fernandes, this procedure returns how color would be perceived by a viewer with color vision deficiency of the specified type and severity.
 • This is useful for testing color schemes for suitability for viewers with CVD.

Examples

 > $\mathrm{with}\left(\mathrm{ColorTools}\right):$
 > $P≔\mathrm{GetPalette}\left("CVD"\right)$
 ${P}{≔}⟨{Palette CVD:}{}\colorbox[rgb]{0,0.352941176470588,0.784313725490196}{{Blue}}{}\colorbox[rgb]{0.980392156862745,0.470588235294118,0.313725490196078}{Orange}{}\colorbox[rgb]{0.627450980392157,0.980392156862745,0.509803921568627}{Pale Green}{}\colorbox[rgb]{0.509803921568627,0.0784313725490196,0.627450980392157}{{Purple}}{}\colorbox[rgb]{0.941176470588235,0.941176470588235,0.196078431372549}{Yellow}{}\colorbox[rgb]{0.666666666666667,0.0392156862745098,0.235294117647059}{{Red}}{}\colorbox[rgb]{0,0.627450980392157,0.980392156862745}{Light Blue}{}\colorbox[rgb]{0.980392156862745,0.470588235294118,0.980392156862745}{Pale Purple}{}\colorbox[rgb]{0.0392156862745098,0.705882352941177,0.352941176470588}{Green}{}\colorbox[rgb]{0,0.431372549019608,0.509803921568627}{{Green Blue}}{}\colorbox[rgb]{0.980392156862745,0.901960784313726,0.745098039215686}{Pale Orange}{}\colorbox[rgb]{0.0784313725490196,0.823529411764706,0.862745098039216}{Light Green Blue}⟩$ (1)
 > $\mathrm{CVDSimulation}\left({P}_{1}\right)$
 ${⟨}\colorbox[rgb]{0.125490196078431,0.274509803921569,0.776470588235294}{{RGB : 0.125 0.275 0.775}}{⟩}$ (2)
 > $\mathrm{seq}\left(\mathrm{CVDSimulation}\left({P}_{i},"protanomaly",75\right),i=1..12\right)$
 ${⟨}\colorbox[rgb]{0.176470588235294,0.349019607843137,0.803921568627451}{{RGB : 0.175 0.35 0.803}}{⟩}{,}{⟨}\colorbox[rgb]{0.647058823529412,0.513725490196078,0.305882352941176}{RGB : 0.646 0.513 0.304}{⟩}{,}{⟨}\colorbox[rgb]{0.96078431372549,0.901960784313726,0.494117647058824}{RGB : 0.961 0.904 0.494}{⟩}{,}{⟨}\colorbox[rgb]{0.105882352941176,0.168627450980392,0.647058823529412}{{RGB : 0.107 0.17 0.645}}{⟩}{,}{⟨}\colorbox[rgb]{1,0.890196078431372,0.623529411764706}{RGB : 1 0.889 0.625}{⟩}{,}{⟨}\colorbox[rgb]{0.188235294117647,0.12156862745098,0.23921568627451}{{RGB : 0.186 0.123 0.239}}{⟩}{,}{⟨}\colorbox[rgb]{0.384313725490196,0.588235294117647,0.996078431372549}{RGB : 0.384 0.588 0.998}{⟩}{,}{⟨}\colorbox[rgb]{0.529411764705882,0.568627450980392,0.996078431372549}{RGB : 0.529 0.567 0.996}{⟩}{,}{⟨}\colorbox[rgb]{0.576470588235294,0.603921568627451,0.345098039215686}{RGB : 0.575 0.605 0.344}{⟩}{,}{⟨}\colorbox[rgb]{0.294117647058824,0.392156862745098,0.513725490196078}{{RGB : 0.293 0.391 0.516}}{⟩}{,}{⟨}\colorbox[rgb]{0.952941176470588,0.898039215686275,0.737254901960784}{RGB : 0.952 0.898 0.739}{⟩}{,}{⟨}\colorbox[rgb]{0.6,0.745098039215686,0.870588235294118}{RGB : 0.601 0.746 0.869}{⟩}$ (3)

The raw option preserves outputs with out of range RGB values:

 > $\mathrm{CVDSimulation}\left({P}_{1},"tritanomaly",\mathrm{raw}\right)\ne \mathrm{CVDSimulation}\left({P}_{1},"tritanomaly"\right)$
 ${⟨}\colorbox[rgb]{0,0.43921568627451,0.474509803921569}{{*RGB* : -0.167 0.444 0.482}}{⟩}{\ne }{⟨}\colorbox[rgb]{0,0.43921568627451,0.474509803921569}{{RGB : -0.00191 0.44 0.474}}{⟩}$ (4)

References

 Matrices for simulating anomalous color vision from: Machado, Oliveira, & Fernandes (2009). A Physiologically-based Model for Simulation of Color Vision Deficiency. doi: 10.1109/TVCG.2009.113, http://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_Simulation/CVD_Simulation.html

Compatibility

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