WCAG 2.1 · EU Accessibility Act · Free

Color Contrast Checker

Check if your foreground and background colors meet WCAG 2.1 accessibility standards. Instant AA and AAA pass/fail, contrast ratio, and color blindness preview.

Foreground (text)
#
contrast ratio
Background
#
The quick brown fox jumps over the lazy dog — Normal text (16px)
Large text (24px bold)
Link text
Normal Text (<18pt)
AA
AAA
Large Text (18pt+ / 14pt bold)
AA
AAA
UI Components / Graphics
AA
Color Blindness Preview
Aa
Normal vision
Aa
Protanopia
Red-blind (1% men)
Aa
Deuteranopia
Green-blind (6% men)
Aa
Tritanopia
Blue-blind (0.1%)

WCAG 2.1 contrast requirements — and why they matter in 2025

The EU Accessibility Act (EAA) came into force on June 28, 2025, requiring all digital products and services sold in the EU to meet EN 301 549, which references WCAG 2.1 Level AA. In the US, the DOJ finalized rules in April 2024 applying WCAG 2.1 AA to state/local government websites under the ADA. Color contrast is one of the most common accessibility failures.

📐

The math

Contrast ratio = (L1 + 0.05) / (L2 + 0.05), where L is relative luminance (0=black, 1=white). AA normal text requires 4.5:1. A dark navy on white is typically 14–18:1 — easily passing AAA.

👁

Color blindness

About 8% of men have color vision deficiency. The preview shows your combination under Protanopia (red-blind), Deuteranopia (green-blind), and Tritanopia (blue-blind) using SVG color matrix filters.

AA vs AAA

AA (4.5:1 normal, 3:1 large) is the legal minimum. AAA (7:1 normal, 4.5:1 large) is best practice for body text. For most designs, achieving AA everywhere and AAA for body copy is the right target.

What the ratio measures

Contrast ratio compares the relative luminance of two colours, on a scale from 1:1 for identical colours to 21:1 for black on white. Relative luminance is not simple brightness — each colour channel is linearised to undo the sRGB transfer curve, then weighted, with green contributing about 72 percent, red 21 percent and blue just 7 percent.

That weighting reflects how the eye works: we are far more sensitive to green than to blue. It is why pure blue text on black fails badly despite looking distinct, and why two colours that seem clearly different can still fail — hue difference does not create luminance difference. Red on green is the classic example, visually loud and often close to identical in luminance.

The consequence for design is that you cannot judge contrast by eye. A colour pair that looks fine to someone with typical vision on a good monitor in a bright room may be unreadable elsewhere, and the calculation is the only reliable check.

The thresholds and what they apply to

WCAG 2.1 level AA requires 4.5:1 for normal text and 3:1 for large text, defined as 18 point or 14 point bold — roughly 24 px, or 18.66 px bold. Level AAA raises these to 7:1 and 4.5:1.

A separate and frequently missed requirement covers non-text content: user interface components and meaningful graphics need 3:1 against adjacent colours. That means input borders, focus indicators, toggle states, icons that convey information, and the segments of a chart all have a contrast obligation. Low-contrast form field borders are one of the most common failures on otherwise careful sites.

Some things are exempt: disabled controls, purely decorative graphics, logos, and text within an image of text that is incidental. Placeholder text is not exempt, despite being styled at low contrast almost everywhere — and using placeholder text as a substitute for a label fails on other grounds too.

Where the formula falls short

The WCAG 2.x calculation has known weaknesses, and they are worth understanding rather than working around blindly. It handles dark themes poorly: light text on a dark background can pass the ratio while appearing to bloom and be harder to read than the number suggests, and conversely some dark-mode pairs that fail numerically read perfectly well.

It also takes no account of font weight or size beyond the single large-text threshold, though a thin 24 px face and a bold one differ substantially in legibility at identical contrast. And it evaluates only two flat colours, so text over a photograph, a gradient or a semi-transparent overlay needs checking against the worst-case region rather than an average.

APCA, the Accessible Perceptual Contrast Algorithm, is being developed for WCAG 3 to address these — it is polarity-aware and accounts for font size and weight. It is not yet a standard to conform to, so WCAG 2 remains the requirement, but where a pair passes one and fails the other it is worth looking at the design rather than the number. Finally, never convey information by colour alone: around 8 percent of men have a colour vision deficiency, so a red-versus-green status needs a shape, icon or label too.

Frequently Asked Questions

What contrast ratio do I need for WCAG AA?

4.5:1 for normal text (under 18pt regular or 14pt bold) and 3:1 for large text (18pt+ regular or 14pt+ bold). UI components and graphics also need 3:1 against their surrounding colors.

What is WCAG AAA?

The enhanced level: 7:1 for normal text, 4.5:1 for large text. AA is the legal standard in most countries. AAA is aspirational — the WCAG spec notes not all content can achieve it.

Does the EU require WCAG compliance?

Yes. The EU Accessibility Act (in force June 28, 2025) applies to most private-sector digital products and services in the EU. It references EN 301 549, which maps to WCAG 2.1 Level AA.

How is relative luminance calculated?

Each RGB channel is linearized (gamma correction removed), then combined: L = 0.2126R + 0.7152G + 0.0722B. This matches human perceptual brightness across the sRGB color space.

Why do two clearly different colours fail the check?

Contrast is based on luminance, not hue. Red and green can look completely distinct while having nearly identical luminance, so the ratio is close to 1:1. The calculation weights green at about 72 percent and blue at 7 percent.

Does contrast apply to anything other than text?

Yes. Interface components and meaningful graphics need 3:1 against adjacent colours — including input borders, focus indicators, toggle states and informative icons. Low-contrast form borders are a very common failure.