ColorTools
CVDSimulation
simulate color vision deficiency (CVD)
Calling Sequence
Parameters
Description
Examples
References
Compatibility
CVDSimulation(color)
CVDSimulation(color, cvdtype, severity, raw)
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 is not converted to a displayable color before it is returned.
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.
with⁡ColorTools:
P≔GetPalette⁡CVD
P≔Palette CVD:⁢Blue⁢Orange⁢Pale Green⁢Purple⁢Yellow⁢Red⁢Light Blue⁢Pale Purple⁢Green⁢Green Blue⁢Pale Orange⁢Light Green Blue
CVDSimulation⁡P1
〈RGB : 0.125 0.275 0.775〉
seq⁡CVDSimulation⁡Pi,protanomaly,75,i=1..12
〈RGB : 0.175 0.35 0.803〉,〈RGB : 0.646 0.513 0.304〉,〈RGB : 0.961 0.904 0.494〉,〈RGB : 0.107 0.17 0.645〉,〈RGB : 1 0.889 0.625〉,〈RGB : 0.186 0.123 0.239〉,〈RGB : 0.384 0.588 0.998〉,〈RGB : 0.529 0.567 0.996〉,〈RGB : 0.575 0.605 0.344〉,〈RGB : 0.293 0.391 0.516〉,〈RGB : 0.952 0.898 0.739〉,〈RGB : 0.601 0.746 0.869〉
The raw option preserves outputs with out of range RGB values:
CVDSimulation⁡P1,tritanomaly,raw≠CVDSimulation⁡P1,tritanomaly
〈*RGB* : -0.167 0.444 0.482〉≠〈RGB : -0.00191 0.44 0.474〉
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
The ColorTools[CVDSimulation] command was introduced in Maple 2020.
For more information on Maple 2020 changes, see Updates in Maple 2020.
See Also
ToDisplayable
Download Help Document