Why WCAG 2.1 contrast ratios are wrong
WCAG 2.1's contrast ratio formula uses a relative luminance calculation (Y = 0.2126R + 0.7152G + 0.0722B, linearized) and computes the ratio as (L1 + 0.05) / (L2 + 0.05). This formula was derived from the IEC 61966-2-1 sRGB standard and the CIE luminance model — a model optimized for object detection in lighting systems, not for reading small text. The formula is spatially unaware: it has no concept of spatial frequency, font weight, or the physiological difference between reading a 10px label and a 32px heading. The original WCAG developers knew this — the standard explicitly notes that the formula is an approximation — but the simplicity made it useful for automated auditing.
