Guide · 12 min read

WCAG contrast requirements, without the jargon

Contrast is the most quoted, most tested, and most misunderstood part of web accessibility. It is also the only one you can settle with arithmetic. This guide covers every threshold, the exceptions people miss, and how to fix a failing colour without starting a fight with whoever owns the brand.

What a contrast ratio actually measures

A ratio compares how much light two surfaces reflect, on a scale from 1:1 — two identical colours, invisible — to 21:1, pure black on pure white, the theoretical maximum. Nothing can score higher.

The number is not a simple brightness average. WCAG uses relative luminance, which weights each channel by how the human eye perceives it:

L = 0.2126 × R + 0.7152 × G + 0.0722 × B

Green carries about 71% of perceived brightness, red roughly 21%, and blue under 7%. This is why a pure blue and a pure green can have identical HSL lightness and wildly different contrast against white — and why every "pick a lightness that looks right" instinct you have is unreliable. Let the contrast checker do the arithmetic.

The thresholds

Four numbers cover almost everything you will ever be asked about:

Content typeLevel AALevel AAA
Normal text (under 24px, or under 18.66px bold)4.5:17:1
Large text (24px+, or 18.66px+ bold)3:14.5:1
UI components & meaningful graphics3:1not defined
Pure decoration, disabled controls, logotypesexemptexempt

AA is the level referenced by most legislation and procurement requirements — including the standards incorporated into the European Accessibility Act and the US Section 508 framework. AAA is aspirational; very few sites reach it across the board, and WCAG itself does not recommend it as a general policy for whole sites.

What counts as "large text"

This is where most self-assessments go wrong. WCAG defines large text as 18pt or larger, which maps to 24px at standard screen density, or 14pt (about 18.66px) and larger when bold.

Three consequences follow:

Common mistake

Designers often treat "large" as "bigger than body copy" and apply 3:1 to a 20px section heading. Audit tools will flag it. When in doubt, hold everything under 24px to 4.5:1 and you never have to argue about the definition.

Non-text contrast: the rule you already break

Success criterion 1.4.11 requires 3:1 for interface components and meaningful graphics — the parts of the UI you need to perceive in order to use them. That includes:

The single most common failure in modern design systems is the light grey input border — #E5E7EB on white measures 1.24:1. It looks clean in a mockup and is effectively invisible to a significant share of users. Darkening it to #767676 gets you to 4.54:1 with almost no visual change.

The exceptions, honestly applied

WCAG exempts several categories. They are narrower than most people assume:

Incidental text

Text that is decorative, invisible to assistive technology, or part of a picture that contains significant other visual content. A slogan in a photograph, for example. The moment that text conveys information, the exemption evaporates.

Logotypes

Text that is part of a logo or brand name has no contrast requirement. Note that this covers the logotype itself — not every instance of your brand colour used as text elsewhere on the page.

Disabled controls

Inactive interface components are exempt. Be careful here: a control that merely looks disabled but is still operable does not qualify, and a contrast this low often leaves users unable to tell whether a control is disabled at all.

Text over images and gradients

The ratio must hold against the worst part of the background behind the text, not the average. WCAG has no averaging mechanism — "it's mostly dark behind the headline" is not a defence.

Three reliable fixes:

  1. A scrim. A semi-transparent solid layer between image and text. A black overlay at 40–50% opacity usually brings an unpredictable photo into a predictable range.
  2. A plate. A solid or heavily blurred panel behind the text block. Common in video players and hero sections.
  3. A text shadow. Only reliable when it is strong enough to guarantee a floor everywhere. Delicate, wide shadows do nothing measurable and are not counted by auditors.

Whatever you choose, test the actual rendered result. Photographs change; a hero image swapped next quarter can silently break compliance on a page that passed last month.

Fixing a failing brand colour

The instinct is to change the colour. Almost always, you should change the value instead.

Worked example

A mid-blue #4A90D9 on white measures 3.34:1 — it clears large text at 3:1 and fails normal text at 4.5:1.

Darken to #2E6FB85.14:1
Darken further to #1F5A9E6.97:1
Same hue, sat. reducedhue unchanged

The hue barely moves. Nobody looking at the page perceives a different brand colour — they perceive the same blue, slightly deeper.

The pattern that works in practice: define two variants of every accent. One tuned for text and icons on light backgrounds, one tuned for large fills. Textbook design systems do exactly this with numbered ramps — the 600 step is your text-safe colour, the 400 step is your fill colour.

A workflow that catches failures early

  1. Fix the palette before the layouts. Decide which colours are text-safe while you still have one page, not forty.
  2. Record it as tokens. A token named text-muted with a documented ratio survives a redesign. A hex pasted into twelve stylesheets does not.
  3. Test the extremes. Placeholder text, disabled-looking-but-active controls, text on hover states, and the lightest thing on the lightest background.
  4. Re-test after every brand refresh. Contrast regressions almost always arrive as a "small tweak to the greys."

Contrast is necessary, not sufficient

Perfect ratios still leave the interface unusable if information is carried by hue alone, if focus is invisible, or if motion cannot be disabled. Contrast is the easiest checkpoint to measure and therefore the most often treated as the finish line. It is the starting line.

Next: designing with colour so it survives colour blindness.


Thresholds in this guide follow the W3C Web Content Accessibility Guidelines. Ratios are computed with the WCAG relative-luminance method — the same formula used by the Pandaxq contrast checker. This guide is educational and is not a compliance certification; check the current W3C recommendation and your applicable legal standard.