The guide
A Palette Is Only as Clear as Its Closest Pair, and Lightness Does Most of the Work
Red-green color vision deficiency affects about 1 in 12 men of Northern European ancestry. Checking a chart palette for them means measuring every pair of colors, not admiring each one.
- 1 in 12 men of Northern European ancestry with red-green deficiency
- 2.0 CIEDE2000 units in one just-noticeable difference (CSS Color 4)
- 23.4 to 2.5 a blue and violet pair, from typical vision to full protan
- 17.2 points of total OKLCH lightness change that cleared the example
Read the full guide Fold the guide
A chart legend is a promise. Each color stands for one thing, and the reader is trusted to match the swatch in the key to the line on the plot. That promise breaks quietly. Nobody sees the failure except the reader it fails, and that reader is common.
Color vision deficiency affects about 2.5 percent of people worldwide, according to the US National Library of Medicine. The red-green forms dominate: among people of Northern European ancestry they occur in about 1 in 12 men and 1 in 200 women. Blue-yellow deficiency is far rarer, under 1 in 10,000 people, and complete loss of color vision rarer still. A dashboard with a few thousand viewers is certain to have some of them.
Four ways to lose a color
The retina carries three kinds of cone, sensitive to long, medium and short wavelengths. Trouble with the long-wavelength cones gives the protan types, trouble with the medium ones gives deutan, and the short ones give tritan. Each type comes in two strengths. Anomalous trichromacy keeps three cone types, one of them shifted. Dichromacy loses one entirely.
The National Eye Institute describes deuteranomaly as the most common form, usually mild, making some greens look redder. Protanomaly makes some reds look greener and dimmer. Tritanopia confuses blue with green and yellow with pink. Achromatopsia, or monochromacy, removes color altogether. The Wikipedia summary of survey data puts protans near 2 percent of men and deutans near 6 percent.
That dimming of red matters for design. A protan viewer does not only confuse red with green; a saturated red can also lose much of its brightness. Two colors that differ mainly in hue, with similar lightness, are therefore the pairs most at risk. Colors that differ strongly in lightness survive almost every kind of deficiency.
What a simulation can show, and what it cannot
A simulation takes a color as a normal viewer would see it and computes a color that a normal viewer would match to what a viewer with a deficiency sees. The classic approach works in LMS space, which describes a color by how strongly it excites each cone type. For a dichromat one coordinate is lost, so every color is projected onto a plane. In the 1999 method of Vienot, Brettel and Mollon, as the DaltonLens notes explain it, protan and deutan colors are projected onto a single plane that passes through black, white, blue and yellow, so those four survive unchanged.
Machado, Oliveira and Fernandes published a different model in 2009. It treats anomalous trichromacy as a shift in the spectral sensitivity of one cone type, and handles mild, severe and complete deficiency in one framework. A shift of about 20 nanometres is treated as equivalent to dichromacy. Their project page tabulates a 3 by 3 matrix in RGB for each type at severities from 0 to 1 in steps of 0.1, and says that values in between may be interpolated from the two nearest matrices.
Those tables make simulation cheap and repeatable, which is what a palette checker needs. They also carry limits that should be said out loud. The authors state that their model does not attempt tritanopia, and simulates tritanomaly only as an approximation. Any simulation shows a typical case. It does not show what one particular person sees, because the size of the cone shift varies from one person to the next.
The two published models also disagree with each other. At full severity they treat saturated blue very differently: the Vienot plane keeps pure blue fixed by construction, while the Machado matrix shifts it. On the example palette below, the gap between the two simulations reaches 12.0 CIEDE2000 units for a mid blue under protan vision. That is a reason to treat any single simulated swatch as an estimate, and to keep a margin.
Measuring the gap between two colors
Seeing that two simulated swatches look alike is not the same as knowing how alike they are. For that, color science uses a difference formula. The simplest is straight-line distance in CIELAB. The CIE refined it into CIEDE2000, published in 2001, which adds five corrections: compensation for lightness, chroma and hue, a treatment of neutral colors, and a rotation term for the troublesome blue region near a hue angle of 275 degrees.
The formula is easy to get subtly wrong. Hue is an angle, so the difference between 350 and 10 degrees is 20, not 340, and the mean hue has to be wrapped the same way. Sharma, Wu and Dalal published implementation notes with 34 test pairs for checking software, several of them with hues on opposite sides of the zero-degree seam. A careful implementation reproduces all 34 to four decimal places. Drop the wrap, and six of those pairs come out wrong, one of them by almost five units.
How large a difference is enough? The CSS Color Module Level 4 notes that one just-noticeable difference is about 2.0 in CIEDE2000. A just-noticeable difference is, by definition, the smallest step a viewer can notice at all. Lines on a chart are thin, legends sit far from the data, and screens and rooms vary. A chart palette needs much more than one just-noticeable step, and the right margin is a judgment, not a constant. The checker described here starts at 10, its own choice for small marks, and leaves the number to the designer.
A worked example
Take six colors that look comfortably distinct to a typical eye: a red #e0442f, a green #3a9e4a, an amber #f0a32b, a blue #2f6fd0, a violet #8e5bc7 and a taupe #7a6a58. Under typical vision the closest pair, blue and violet, is 23.4 units apart. Red and green, the pair everyone worries about, are 64.1 apart.
Now simulate deutan vision with the Machado tables, raising the severity. The blue and violet pair shrinks to 16.1 at a quarter, 10.5 at a half and 6.8 at three quarters, then 4.9 at full severity. Under full protan vision it falls from 23.4 to 2.5, close to the edge of noticeability. Red and green, meanwhile, drop to 6.9 under full deutan. The pair that looked safest by name was not the one that failed hardest.
Hue names are a poor guide. A simulation removes one axis of difference, and the pairs that leaned on that axis collapse first.
The reason is lightness. Blue and violet have almost the same OKLCH lightness, 55.3 and 57.6 percent, and differ mainly in hue. Remove the red-green signal and little remains to separate them. The red and green also sit close in lightness, at 60.9 and 62.1 percent.
The fix that preserves the palette’s character is therefore to move lightness and leave hue and chroma alone. OKLab and its polar form OKLCH, designed by Bjorn Ottosson and adopted by CSS, aim to predict perceived lightness, chroma and hue so that one can be changed without disturbing the others. A search over lightness alone, under the constraint that every pair clears 10 under typical, protan, deutan and tritan simulation and that every color stays inside the sRGB gamut, found a proposal for this palette.
It darkens the red from 60.9 to 54.5 percent, darkens the blue from 55.3 to 52.0 and lifts the violet from 57.6 to 65.0. Green, amber and taupe stay as they were. The total change is 17.2 points of OKLCH lightness. Afterwards the closest pair under protan vision measures 10.04, and the blue and violet pair under deutan vision reaches 16.3. Each color keeps its OKLCH hue and chroma, within the rounding of a six-digit hex code, so the chart still reads as the same chart.
Palettes for charts and maps, and their limits
Sequential palettes, where colors stand for ordered values, need a different check. Lightness should rise or fall steadily along the scale for every kind of viewer, because order carried by hue alone disappears with the hue. Diverging and categorical palettes need the pairwise check above. Maps add one more trap: neighbouring regions are often small, so the effective threshold should be higher still.
No measurement replaces redundancy. The Web Content Accessibility Guidelines say that color must not be the only visual means of conveying information, and they ask for a contrast ratio of at least 3 to 1 for graphical objects needed to understand content. Direct labels on lines, patterns on bars and distinct marker shapes help every reader, including those whose deficiency no simulation describes well.
The method has edges worth naming. A lightness fix found for four conditions may still fail a fifth; in the example, luminance-only vision was not included and its closest pair after the fix is under one unit. A search on a lightness grid can report that no fix exists within its bounds when a palette has too many colors for the threshold. And a passing number is not a guarantee. It is a measured distance, under a stated model, against a threshold someone chose.
That is still far better than a palette called safe because a list said so. Measuring the closest pair, under each kind of vision, at the severity that matters, turns a vague worry into a number. Moving lightness rather than hue keeps the palette recognisable. The reader at the other end of the legend never needs to know that the work was done.
Sources
Every source consulted for this guide. Links checked October 25, 2026.
- Color vision deficiency MedlinePlus Genetics, US National Library of Medicine
- Types of Color Vision Deficiency National Eye Institute
- Color Blindness National Eye Institute
- Color blindness Wikipedia
- LMS color space Wikipedia
- A Physiologically-based Model for Simulation of Color Vision Deficiency Gustavo M. Machado, Manuel M. Oliveira and Leandro A. F. Fernandes, Instituto de Informatica, UFRGS (project page with the published matrices)
- Digital video colourmaps for checking the legibility of displays by dichromats OpenAlex catalogue record W2104060123 (Francoise Vienot, Hans Brettel and John D. Mollon, Color Research and Application, 1999)
- Understanding LMS-based Color Blindness Simulations DaltonLens
- GitHub - DaltonLens/libDaltonLens: Single-file public domain implementation of color vision deficiency algorithms DaltonLens on GitHub
- Color difference Wikipedia
- The CIEDE2000 color-difference formula: Implementation notes, supplementary test data, and mathematical observations OpenAlex catalogue record W2000512760 (Gaurav Sharma, Wencheng Wu and Edul N. Dalal, Color Research and Application, vol. 30, no. 1)
- CSS Color Module Level 4 W3C
- Oklab color space Wikipedia
- A perceptual color space for image processing Bjorn Ottosson
- Web Content Accessibility Guidelines (WCAG) 2.2 W3C