Color Contrast Checker

Enter a text color and a background color to see their contrast ratio instantly, with pass/fail results for every WCAG level and text size. The default pair — white on #2D6A4F — lands at 6.39:1, which passes AA but misses AAA for normal text.

Check contrast

6.39:1 contrast ratio

The quick brown fox jumps over the lazy dog — normal text at 16px.

The quick brown fox jumps over the lazy dog.

AA normal text needs ≥ 4.5:1 Pass
AA large text needs ≥ 3:1 Pass
AAA normal text needs ≥ 7:1 Fail
AAA large text needs ≥ 4.5:1 Pass
UI components needs ≥ 3:1 Pass
Graphics needs ≥ 3:1 Pass
Checking a specific color? Every page in the color library — like #2D6A4F or #DC2626 — ships precomputed white and black contrast ratios with AA/AAA verdicts, plus the full tint and shade ramps to fix a failing pair.

What the Contrast Ratio Means

The contrast ratio measures how different two colors are in brightness. It runs from 1:1 (a color against itself) to 21:1 (pure black on pure white — exactly 21.00:1 by the formula). The higher the number, the easier text is to read.

Behind the number is relative luminance — a measure of how bright a color looks to the human eye, on a scale from 0 (black) to 1 (white). It isn't a simple average of red, green, and blue: each channel is first gamma-corrected, then green counts for about 71% of the result, red about 21%, and blue only about 7%, because our eyes are far more sensitive to green light. The ratio is then (lighter + 0.05) ÷ (darker + 0.05) — the 0.05 accounts for ambient light reflecting off a screen.

The classic reference point: #767676 is the lightest gray that still passes AA on a white background. It measures 4.54:1 — just clearing the 4.5:1 bar. One step lighter, #777777, falls under it. That knife-edge is why designers check ratios with a tool instead of eyeballing them.

WCAG Requirements at a Glance

RequirementMinimum ratioApplies to
AA — normal text4.5:1Body copy, labels, links (WCAG 1.4.3)
AA — large text3:1Headlines and large text (WCAG 1.4.3)
AAA — normal text7:1Enhanced level for body copy (WCAG 1.4.6)
AAA — large text4.5:1Enhanced level for large text (WCAG 1.4.6)
Non-text UI & graphics3:1Input borders, icons, focus rings, chart elements (WCAG 1.4.11)

"Large" has a precise definition: at least 18pt (24px) at regular weight, or at least 14pt (about 18.66px) if bold. Everything smaller counts as normal text and needs the stricter ratio. Most teams target AA across the board; AAA is worth the extra effort for reading-heavy interfaces like documentation and articles.

How to Fix a Failing Pair

Contrast is almost entirely a lightness problem, so the fix usually isn't a new color — it's the same hue moved along its lightness ramp. Darken the background or lighten the text, and the pair keeps its character while the ratio climbs:

Small moves go a long way: near the 4.5:1 boundary, a 5–10% lightness shift is frequently the difference between Fail and Pass.

Common Accessible Pairs

Real pairs that pass, with their exact ratios — useful as starting points or sanity checks:

PairRatioPasses
#1A1A1A on #FFFFFF 17.40:1 AAA, all sizes
#111827 on #F9FAFB 16.98:1 AAA, all sizes
#1E3A5F on #E8F0EC 9.92:1 AAA, all sizes
#FFFFFF on #2D6A4F 6.39:1 AA normal · AAA large
#FFFFFF on #0F766E 5.47:1 AA normal · AAA large
#FFFFFF on #2563EB 5.17:1 AA normal · AAA large

Note the pattern: near-black on near-white sails past AAA, while white on saturated mid-tone brand colors typically lands in the 5–6.5:1 range — solid AA, and AAA for large text only.

Frequently Asked Questions

Related tools: lighten a color · darken a color · tint and shade generator · hex to RGB converter · color library

Found a pair that passes? Put it to work on a page that's yours — create your free MinglyLink page →