ColorTools - Maple Programming Help

Home : Support : Online Help : Graphics : Packages : ColorTools : Color and Color Object Manipulation Commands : ColorTools/CVDSimulation

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.431372549019608,0.509803921568627}{{Green Blue}}{}\colorbox[rgb]{0.941176470588235,0.941176470588235,0.196078431372549}{Yellow}{}\colorbox[rgb]{0.980392156862745,0.470588235294118,0.980392156862745}{Pale Purple}{}\colorbox[rgb]{0.0392156862745098,0.705882352941177,0.352941176470588}{Green}{}\colorbox[rgb]{0,0.352941176470588,0.784313725490196}{{Blue}}{}\colorbox[rgb]{0.666666666666667,0.0392156862745098,0.235294117647059}{{Red}}{}\colorbox[rgb]{0.980392156862745,0.901960784313726,0.745098039215686}{Pale Orange}{}\colorbox[rgb]{0,0.627450980392157,0.980392156862745}{Light 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.0784313725490196,0.823529411764706,0.862745098039216}{Light Green Blue}⟩$ (1)
 > $\mathrm{CVDSimulation}\left(P\left[1\right]\right)$
 ${⟨}\colorbox[rgb]{0.254901960784314,0.313725490196078,0.513725490196078}{{RGB : 0.255 0.314 0.512}}{⟩}$ (2)
 > $\mathrm{seq}\left(\mathrm{CVDSimulation}\left(P\left[i\right],"protanomaly",75\right),i=1..12\right)$
 ${⟨}\colorbox[rgb]{0.294117647058824,0.392156862745098,0.513725490196078}{{RGB : 0.293 0.391 0.516}}{⟩}{,}{⟨}\colorbox[rgb]{1,0.847058823529412,0.419607843137255}{RGB : 1 0.846 0.418}{⟩}{,}{⟨}\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.176470588235294,0.349019607843137,0.803921568627451}{{RGB : 0.175 0.35 0.803}}{⟩}{,}{⟨}\colorbox[rgb]{0.188235294117647,0.12156862745098,0.23921568627451}{{RGB : 0.186 0.123 0.239}}{⟩}{,}{⟨}\colorbox[rgb]{0.952941176470588,0.898039215686275,0.737254901960784}{RGB : 0.952 0.898 0.739}{⟩}{,}{⟨}\colorbox[rgb]{0.384313725490196,0.588235294117647,0.996078431372549}{RGB : 0.384 0.588 0.998}{⟩}{,}{⟨}\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]{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\left[1\right],"tritanomaly",\mathrm{raw}\right)\ne \mathrm{CVDSimulation}\left(P\left[1\right],"tritanomaly"\right)$
 ${⟨}\colorbox[rgb]{0,0.482352941176471,0.458823529411765}{{*RGB* : -0.124 0.477 0.453}}{⟩}{\ne }{⟨}\colorbox[rgb]{0,0.482352941176471,0.458823529411765}{{RGB : 0 0.483 0.461}}{⟩}$ (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.