Color blindness, formally color vision deficiency, is a reduced ability to tell certain colors apart, and it affects about 1 in 12 men according to the US National Eye Institute. Most people with it are born with it and are not blind to color at all. For web design the rule that matters is WCAG success criterion 1.4.1 Use of Color, a Level A requirement that color must not be the only way to convey information.
Normal color vision uses three kinds of cone cells in the retina. A deficiency means one kind is missing or responds differently, which collapses some color differences. The National Eye Institute describes these groups.
Men have a much higher risk than women. Symptoms are often mild enough that people do not know they have the condition. For designers the practical consequence is that hue alone is an unreliable signal. A lightness difference gives a second signal, which is why contrast checks help even though WCAG contrast is not a color-blindness test.
const lin = v => { v /= 255; return v <= 0.04045 ? v / 12.92 : ((v + 0.055) / 1.055) ** 2.4; };
const lum = h => { const n = parseInt(h.slice(1), 16);
return 0.2126 * lin(n >> 16 & 255) + 0.7152 * lin(n >> 8 & 255) + 0.0722 * lin(n & 255); };
const ratio = (a, b) => { const [x, y] = [lum(a), lum(b)].sort((p, q) => q - p); return (x + 0.05) / (y + 0.05); };
const pairs = [['red vs green, same lightness', '#c00000', '#007a00'],
['red vs light green', '#c00000', '#80e080'],
['blue vs orange', '#0072b2', '#e69f00']];
for (const [n, a, b] of pairs) console.log(n.padEnd(30), a, b, ratio(a, b).toFixed(2) + ':1');
red vs green, same lightness #c00000 #007a00 1.17:1
red vs light green #c00000 #80e080 3.98:1
blue vs orange #0072b2 #e69f00 2.30:1
The first pair differs only in hue, with a luminance ratio of 1.17:1. Someone with protanopia or deuteranopia has little else to separate them, so a status dot that is red versus green with nothing else fails the intent of 1.4.1.
About 1 in 12 men have a color vision deficiency, per the National Eye Institute. The rate in women is much lower, and the NEI does not give a single figure on the page used for this entry. Estimates of the exact percentage vary by population.
Add a second cue that is not color: an icon, a text label, a pattern, an underline on links or a shape. Then make sure the two colors also differ in lightness. A contrast ratio check is a rough proxy for that, since the ratio is computed from luminance.