What it simulates
Most color vision deficiency comes from one of the three cone types in the eye being missing or working differently. When a cone type is missing, the condition is a dichromacy and its name ends in -opia. When it is present but its sensitivity is shifted, it is an anomalous trichromacy, ending in -anomaly, and it can be mild or strong.
| Simulation | Cone affected | Colors often confused |
|---|---|---|
| Protanopia, protanomaly | L (long wavelength, "red") | Red with green; reds also look darker |
| Deuteranopia, deuteranomaly | M (medium wavelength, "green") | Red with green |
| Tritanopia, tritanomaly | S (short wavelength, "blue") | Blue with green, yellow with pink or red |
| Achromatopsia | No working cones, or only one type | All hues; only lightness remains |
How common it is
The US National Eye Institute says about 1 in 12 men have color vision deficiency, that men are at much higher risk than women, and that red-green types are the most common, with deuteranomaly the most common red-green type. A review of large population surveys (Birch, 2012) puts inherited red-green deficiency at about 8% of men and about 0.4% of women of European descent, and between 4% and 6.5% of men of Chinese and Japanese descent. Complete color blindness (achromatopsia) is rare.
How the simulation works
The tool uses the model of Machado, Oliveira and Fernandes (2009), which describes each deficiency as one 3×3 matrix applied to an RGB color. The authors publish matrices for protan, deutan and tritan types at severities from 0.0 to 1.0 in steps of 0.1, where 1.0 is dichromacy; for protan and deutan types, 1.0 corresponds to a 20 nm shift of the affected cone's peak sensitivity. For a severity between two steps, such as 0.65, the tool blends the two nearest matrices, the shortcut the authors describe.
Each color is first converted from sRGB to linear light, multiplied by the matrix, clipped to the 0 to 1 range and converted back to sRGB. Each matrix row adds up to 1, so white, black and grays stay the same. Achromatopsia is shown as the gray with the same WCAG relative luminance as the original.
These are approximations. Real color vision varies from person to person, the matrices model an average observer, and achromatopsia in particular relies on rod cells, whose sensitivity differs from the luminance formula used here. Use the results to spot likely problems, not as an exact picture of what someone sees.
How clashing pairs are found
For every pair of colors, the tool measures the difference before and after simulation with deltaE OK, the straight-line distance in the OKLab color space. CSS Color 4 treats 0.02 as one just noticeable difference when it maps colors into a gamut, but that is for two colors side by side. Small chart markers, lines and legend keys seen apart need a clearer gap, so this tool flags pairs that were at least 0.05 apart before simulation (two and a half times that threshold) and fall below 0.05 after it. Pairs that are already that close with normal vision are listed separately.
Worked example
The sample palette includes a status red #d64545 and a success green #2e9e4f. With normal vision their deltaE OK is 0.297, a very clear difference.
- Deuteranopia turns them into
#918441and#928755, two olive tones only 0.022 apart, so the pair is flagged. - Protanopia gives
#6d6544and#9f9048, which differ mainly in lightness. - Deuteranomaly at severity 0.6 gives
#a37741and#848d53, 0.070 apart: closer, but above the 0.05 line. - Achromatopsia gives
#797979and#8a8a8a.
Under deuteranomaly the gap shrinks steadily as severity rises: 0.192 at 0.2, 0.118 at 0.4, 0.070 at 0.6, 0.035 at 0.8 and 0.022 at 1.0.
Common mistakes
- Relying on hue alone. Red for errors and green for success can look alike. Add an icon, label or pattern, or make the two colors differ clearly in lightness.
- Testing only deuteranopia. Tritan and achromatic simulations catch different clashes, such as blue with purple.
- Testing the palette but not the chart. Thin lines and small dots are harder to tell apart than large swatches, so leave a bigger gap for them.
- Treating a simulation as a diagnosis. It is a model of an average observer, not a test of anyone's vision.