Designing for color vision deficiency
Many people see a narrower range of hues than the designer of a page or chart expected. You cannot see through their eyes, but you can simulate the common types, test your work, and make color only one of several cues.
How normal color vision works
The retina has three kinds of cone cell. Each responds most strongly to a different band of light: long wavelengths (L, often called red cones), medium wavelengths (M, green) and short wavelengths (S, blue). The brain compares the three signals to tell hues apart. A color vision deficiency happens when one kind of cone is missing or its response is shifted.
The main types
| Type | Cone affected | Colors often confused |
|---|---|---|
| Protanopia / protanomaly | L (long) missing or shifted | Red with green, brown and dark green; reds look darker |
| Deuteranopia / deuteranomaly | M (medium) missing or shifted | Red with green, orange with yellow-green |
| Tritanopia / tritanomaly | S (short) missing or shifted | Blue with green, yellow with pink or light grey |
| Achromatopsia | Cones barely work | Sees in values of light and dark only |
The “-anopia” forms mean one cone type is absent. The “-anomaly” forms mean it is present but shifted, which gives a milder, partial version. Red-green types are the most common and occur far more often in men, because the genes for the L and M cones sit on the X chromosome.
How a simulator works
A simulator cannot know what someone experiences, but it can show which colors become hard to tell apart. The usual method has four steps:
- Convert each pixel from sRGB to linear RGB, removing the gamma encoding.
- Multiply by a 3×3 matrix that turns linear RGB into cone responses (L, M, S).
- Replace the missing cone’s response with a value estimated from the other two, so colors that differ only in that cone collapse onto one color.
- Convert back to linear RGB and re-apply gamma.
Published models such as those by Brettel, Viénot and Machado differ in their matrices and in how they handle the partial forms. For checking a design, any of them will reveal the same practical problems.
Test your own page without extra software
Chromium-based browsers have a built-in simulator. Open DevTools, open the command menu with Ctrl + Shift + P (Cmd + Shift + P on a Mac), type Rendering, and find the “Emulate vision deficiencies” menu. Firefox offers a similar option in its Accessibility panel. Switch through each type and look at:
- links inside paragraphs, if only color marks them;
- form fields that turn red on error;
- charts and maps with a color legend;
- status badges such as “online” and “offline”;
- any image where a red and a green element must be told apart.
A quick extra test: turn the page to greyscale. If two important things become the same grey, they rely on hue alone.
Fixes that help everyone
Before: a line chart with a red line for “expenses” and a green line for “income”, and a legend off to the side.
After: the same chart with blue and orange lines, one solid and one dashed, and a text label at the end of each line. The legend is no longer needed.
- Add a second cue. Use icons, patterns, line styles, position or text alongside color.
- Underline links in body text. Color alone is not enough to mark them.
- Prefer blue and orange to red and green when two series must contrast. They stay distinct for the common red-green types.
- Vary lightness, not just hue. A dark and a light color stay distinct under every type, including achromatopsia.
- Write error messages. “Email address is missing” beside the field works where a red border alone does not.
Common mistakes
- Testing only one type. A palette that survives deuteranopia can still fail tritanopia.
- Assuming everyone sees in greyscale. Most people with a deficiency see many colors; they just confuse certain pairs.
- Treating contrast ratio as the whole answer. The contrast formula checks lightness difference, which helps, but it does not tell you whether two chart colors can be told apart.
Questions people ask
Can glasses or filters fix color blindness?
Some tinted lenses change how certain colors look and help some people tell particular pairs apart. They do not restore missing cones. Design choices still matter.
Is a simulator accurate for every person?
No. Simulators model the typical full deficiency. Real people vary, and many have a partial form. Use a simulator to find problems, not to predict one person’s experience.