On a scale from 1:1 to 21:1, WCAG 2.1 sets the bar for accessible text contrast at 4.5:1 on body copy. Slip below it and a slice of your audience stops reading: low-vision users, cheap panels, or anyone on your page in bright sunlight. Contrast is not a matter of taste, it is a measurable ratio you can test in seconds and fix without a redesign. Here is the method, step by step, to catch failing pairs and correct them.
How contrast ratios and WCAG thresholds work
Contrast is calculated from the relative luminance of two colours: the text and the surface behind it. The result is expressed as a ratio, from 1:1 (two identical colours, invisible text) to 21:1 (pure black on pure white). The higher the number, the more the text separates from its background.
WCAG 2.1 requires at least 4.5:1 for body text and 3:1 for large text under Success Criterion 1.4.3 (Contrast Minimum) at Level AA. The stricter Level AAA target, Success Criterion 1.4.6, raises those figures to 7:1 and 4.5:1. The pivot is size: "large text" begins at roughly 18 pt (about 24 px) in a regular weight, or 14 pt bold (about 18.7 px). Those pixel values are approximations of the point sizes named in the standard, but they are the practical thresholds you design against. In plain terms, the same grey that fails behind a paragraph can pass behind a bold heading.
A third rule gets forgotten constantly. Under Success Criterion 1.4.11 (Non-text Contrast), non-text interface elements such as input borders, icons, button outlines and the meaningful strokes of a chart must reach 3:1 against what surrounds them. A button whose fill blends into the page fails that criterion even when its label reads perfectly.
| Element | Level AA | Level AAA |
|---|---|---|
| Body text (under 18 pt / ~24 px) | 4.5:1 | 7:1 |
| Large text (18 pt+ or 14 pt bold / ~18.7 px) | 3:1 | 4.5:1 |
| Interface components and icons | 3:1 (SC 1.4.11) | not defined |
| Logos, purely decorative text | no requirement | no requirement |
Step 1: Measure real pairs, never trust your eye
The first habit to drop is judging by sight. A colour that looks legible on your calibrated monitor can slide under 3:1 on an entry-level laptop or a phone at low brightness. You measure contrast, you do not estimate it.
Three families of tools cover the job without installing anything heavy:
- Browser developer tools. The colour picker in Chrome and Firefox shows the contrast ratio directly and flags whether it clears Level AA or AAA.
- Built-in audits. An accessibility report such as Lighthouse, or an audit extension, surfaces every failing pair on a page in a single pass.
- Dedicated contrast checkers. Paste two hex codes, one for the surface and one for the text, and read the exact ratio.
The reference documentation stays the Web Accessibility Initiative at the W3C, which publishes the official criteria and explains the luminance calculation. That is the source to cite when a client disputes a threshold.
Watch one trap in particular: text set over a photo or a gradient. The ratio has to be checked against the surface actually sitting behind each letter, not against an average. In practice you add a dark scrim or a semi-opaque panel behind the text to guarantee a stable background. That logic of visual hierarchy connects straight to the perception laws we break down in our UX analyses: controlled contrast is also a guided reading path.
Step 2: Fix failing pairs by luminance, not hue
When a pair fails, the reflex is to swap the colour. Usually you do not need to. Adjust the lightness rather than the hue, and the ratio climbs while your palette stays intact. Darkening the text or lightening the surface does most of the work.
Two colour families trip up nearly every designer:
- Neon. An electric cyan or a saturated magenta on white looks aggressive, so it feels "strong", yet its real ratio often caps around 1.5:1 to 2:1. These bright, saturated tones are built to glow on very dark surfaces, not to carry text on a light one.
- Pastel. The opposite failure: a powder pink or a pale mint on white reads soft and gentle, and sits well under 3:1.
Here is the workflow to rescue a failing pair without redrawing your brand:
- Lock the colour you cannot move, usually the brand colour.
- Shift the second colour one step of lightness at a time, re-measuring at each step.
- Stop at the first value that clears 4.5:1 for body copy.
- Reserve the original saturated tone for large headings, solid fills or decorative accents, where the 3:1 bar leaves more room.
As a reference point, a mid grey around #767676 sits close to the lightest grey that still clears 4.5:1 on pure white. Anything paler than that fails for body copy, which is why so many "subtle" secondary labels and captions slip below the line without anyone noticing. Keep that boundary in mind and you can eyeball a first draft, then confirm it with a tool.
This discipline applies to every project, from a simple blog to a full website design rebuild: an accessible palette is planned up front, not patched the night before launch.
Step 3: Extend the check to components and states
A site can render flawless body text and still lock people out through its interactions. Contrast does not stop at paragraphs, and Success Criterion 1.4.11 sets a 3:1 minimum for interface components and meaningful graphics.
Run through these spots, the ones teams skip most often:
- Form fields. The border has to clear 3:1 against the surface, otherwise the user cannot tell where to type.
- Focus states. The ring around a keyboard-selected element must be clearly visible at 3:1. It is the single biggest quick win for anyone navigating without a mouse.
- Placeholder text. Rendered too pale, it drops below the threshold; never hand it essential instructions, since it vanishes the moment someone starts typing.
- In-paragraph links. If colour is the only cue, that colour needs 3:1 against the surrounding text, or you add an underline so the link survives for colour-blind readers.
- Error and success messages. Never encode meaning by colour alone; pair it with an icon or a label.
One nuance keeps designers from over-correcting: WCAG exempts inactive components. A genuinely disabled button or a greyed-out field is not required to meet the 3:1 rule, because it carries no action. The exemption is narrow, though. The moment a control is live, its border, label and focus state all fall back under the criteria, so reserve the low-contrast grey strictly for states the user cannot interact with.
This level of rigour is exactly what a serious buyer expects, and it is one of the things that separates the studios in our directory of leading web design agencies from the rest. It also travels well beyond accessibility: the same templates that drag on contrast tend to drag on search performance, and a structured SEO audit of your site frequently surfaces both families of defect in the same crawl. One review, two problems named.
Your contrast checklist in five moves
From the WCAG thresholds to the concrete fix, keep this sequence and run it before every launch:
- Measure, do not guess. Pull the exact hex codes and read the ratio in a tool, never by eye.
- Aim for 4.5:1 on body copy, 3:1 on large headings. Hold Level AAA (7:1) as the target for long, dense reading.
- Correct with luminance, not hue. You stay faithful to the brand while clearing the threshold.
- Treat neon and pastel as decoration, not as text carriers on a light surface.
- Extend the test to components and states: borders, focus rings, links, placeholders and messages. A single failing pair is enough to shut one visitor out.
A legible site is not a dull one. It is a site where every contrast was chosen, measured and signed off. Five moves, a few minutes per template, and your design finally keeps the promise it puts on screen.