A11yDen

WCAG Contrast Checker

Enter a text colour and a background colour. Get the exact WCAG 2.2 contrast ratio and pass/fail verdicts for AA and AAA — for normal and large text. Runs in your browser; nothing is uploaded.

Check a colour pair

Formats: #767676 · #777 · rgb(118,118,118) · hsl(0,0%,46%) · colour names

Semi-transparent colours are blended: background over white first, then text over it.

Preview

Normal text — the quick brown fox
Large text — the quick brown fox

Contrast ratio

—

Verdicts by level and text size
LevelNormal textLarge text

Failing? Get passing suggestions → Contrast Suggester

Computed on your device with the WCAG 2.2 relative-luminance formula (SC 1.4.3, SC 1.4.6).

How it works

Each colour is converted to its relative luminance using the WCAG 2.2 formula, and the ratio is (lighter + 0.05) ÷ (darker + 0.05). Verdicts compare the unrounded ratio against the thresholds below; the displayed figure is truncated to two decimals, never rounded up. Large text means at least 24px, or 19px bold.

What WCAG 2.2 requires

Contrast minimums (SC 1.4.3 AA · SC 1.4.6 AAA · SC 1.4.11 AA)
LevelNormal textLarge textUI components & graphics
AA4.5 : 13 : 13 : 1
AAA7 : 14.5 : 1—

What this tool cannot check

Text over images or gradients, hover and focus states you don't enter, and whether the text is readable in context. A passing ratio is one requirement among 55 A/AA criteria — the WCAG Checklist covers the rest.

Questions

Why does 4.48 show as a fail when it rounds to 4.5?

Because the requirement is a true 4.5:1. This checker never rounds a ratio up into a pass; the displayed two-decimal figure is truncated, not rounded.

What about APCA?

APCA is a candidate algorithm for a future WCAG version; it is not part of WCAG 2.2. This tool reports WCAG 2.2 verdicts only, so nothing here can be mistaken for a WCAG result.

How are transparent colours handled?

The background is blended over white first, then the text colour over that result — the same effective colours a visitor would see on a white page.

Related tools

All tools

All ten tools are listed on the homepage.