Grey text on a white background is the default of every elegant interface and the fastest way to fail an accessibility audit. The difference between “tasteful” and “unreadable” is a ratio, and the ratio is arithmetic.
WCAG defines it as contrast ratio: how much brighter one colour is than the other, from 1:1 (identical) to 21:1 (black on white).
The thresholds
| Level | Normal text | Large text |
|---|---|---|
| AA (minimum) | 4.5:1 | 3:1 |
| AAA (enhanced) | 7:1 | 4.5:1 |
“Large text” means 18 pt regular or 14 pt bold — roughly 24 px and 18.66 px on screen. Below that, the 4.5:1 minimum applies.
Real numbers
| Pair | Ratio | Verdict |
|---|---|---|
| Black on white | 21:1 | Maximum |
Grey #767676 on white |
4.54:1 | Just passes AA |
Grey #949494 on white |
3.03:1 | Fails AA for body text |
Blue #2f5eb0 on white |
6.27:1 | Passes AA and AAA |
Red #c23b2e on white |
5.30:1 | Passes AA |
| Yellow on white | 1.07:1 | Invisible |
#767676 is worth memorising: it is the lightest grey that still passes 4.5:1 on white. One step lighter and you are below the line. On a cream background the same grey fails, because the background is not pure white — the calculation is a pair, not a colour.
How the ratio is computed
Convert each colour to relative luminance: linearise the RGB channels, weight them (0.2126 red, 0.7152 green, 0.0722 blue), add them up. Then:
ratio = (lighter + 0.05) / (darker + 0.05)
The +0.05 is not arbitrary: it stops near-black pairs from producing absurd scores. You do not need to do this by hand — the contrast checker takes two colours and returns the ratio and the verdict.
Where it goes wrong
Grey on grey. Disabled buttons, placeholder text and secondary labels are the usual offenders, and they are exactly the text people need to read.
Brand colour as text. A brand colour chosen for a logo is not automatically readable as body text. A bright yellow works on a dark header and disappears on white.
Colour alone. A red error and a green success distinguished only by hue fails for colour-blind users; add an icon or a label.
Dark mode by inversion. Flipping the colours does not preserve the ratio. The pair has to be checked again.
The quick fix
Keep body text at #333 or darker on white, and secondary text no lighter than #767676. If a design needs lighter grey, increase the size or the weight — large text only needs 3:1.
The colour palette generator produces a set of shades, and the contrast checker tells you which of them can carry text. Design the palette around the pairs that pass, not the other way round.
Contrast is not a constraint on design. It is the part of the design that decides whether the design works.
Hero photo: Color Swatches, CC0, via Openverse (StockSnap).
