About
A ratio is a floor, not a taste
Last updated 21 November 2026
A contrast ratio says one thing well: how far apart two colours sit in luminance, on a scale anyone can reproduce. It does not say whether the pair looks good, and it was never meant to.
What the number measures
WCAG defines relative luminance from the red, green and blue channels after a gamma step, weighting green at 0.7152, red at 0.2126 and blue at 0.0722. The ratio is then (lighter + 0.05) / (darker + 0.05), so 1:1 is two identical colours and 21:1 is black on white. Hue never enters the calculation. A saturated pink and a grey with the same luminance score the same, which is why the number can be trusted and also why it cannot finish the judgement alone.
The practical value is that it is objective. Any tool that follows WCAG 2.2 returns the same figure for the same pair, so a number can be written into a ticket, a design review or a procurement document and mean the same thing to everyone who reads it.
Where the fix comes from
The fix works in OKLCH, a perceptual colour space with lightness, chroma and hue kept apart. The hue and the chroma of your colour are fixed, lightness is stepped up or down in small increments, and the search stops at the first step that meets the target. Both directions are measured and the shorter one wins, so a colour that only needed to be a little lighter is not made much darker instead.
That is a deliberate limit. Jumping straight to black passes every check and destroys the palette. Keeping the hue means the fixed colour is still recognisably the one you chose, and if it no longer is, the more honest conclusion is that the pair was wrong rather than the colour.
Why APCA sits beside WCAG
APCA, the candidate method behind WCAG 3, models perceived contrast rather than a fixed ratio. It returns an Lc score whose sign tells you which way round the pair is: dark text on a light background is positive, the reverse is negative. Near the middle of the range the two directions are not symmetric, and a single ratio cannot express that. The page shows both because they answer different questions, and because an auditor and a reader are not always looking for the same thing.
Why the palette is a matrix
A design system is not one pair. It is a set of colours that will be combined, eventually, in ways nobody planned. Measuring every colour on every other colour finds the combination that the eye slides past: a muted caption on a tinted card, a disabled label on a raised surface. The four simulations then ask the same matrix under protanopia, deuteranopia, tritanopia and achromatopsia, because a pair that only works for one kind of colour vision is not finished.
What it leaves to you
- Which colour is allowed to move. The fix changes the foreground, because text usually sits on a surface someone else decided. If the background is the free one, swap, fix, swap back.
- Size and weight. A pass at 4.5:1 is a minimum, not a comfort. Long text at the minimum is tiring even when it is compliant.
- Images and transparency. A label over a photograph has as many ratios as the photograph has pixels. The number for a solid colour is the easy half.
- States. Hover, focus, disabled and error each need their own pair, and a disabled state that is deliberately faint still has to be recognisable as a control.
- People. Contrast tools remove one kind of doubt. They do not replace watching someone read the page.
Who made it
Pikkola Lab builds small tools that keep the work in the browser. This is tool No. 55. Write to hello@pikkola.com with a pair that measured well and still read badly, and say what was on the screen around it.