Color Contrast Checker

Works offlineNothing is uploadedFree, no sign-up
The quick brown fox — 16px and bold 24px
The quick brown fox — 16px and bold 24px
CONTRAST—
AA · NORMAL TEXT—
AA · LARGE TEXT—
AAA · NORMAL TEXT—
AAA · LARGE TEXT—

Computed in this tab — your palette never leaves it.

Two colors in, the WCAG verdict out: the exact sRGB relative-luminance formula from the specification, the ratio, AA and AAA for normal and large text — and, when your pair fails, the nearest shade of the foreground that passes, computed instead of guessed. A live sample shows the pair the whole time.

The formula, not the impression

Contrast is defined, not judged: each color's relative luminance is computed by linearising sRGB — the ≤0.04045 branch, the 2.4 exponent, the 0.2126/0.7152/0.0722 weights — and the ratio is (lighter + 0.05) / (darker + 0.05). Every checker that follows the spec produces the same number to the second decimal, which is precisely what makes the number citable in a review.

The live sample exists because the number is necessary but not sufficient: a pair can pass AA and still be an aesthetic mistake. Read the verdicts, then read the sample.

Frequently asked questions

What do 4.5:1 and the other thresholds actually mean?

They are WCAG's floor for readability: 4.5:1 for normal text and 3:1 for large text at level AA — the level laws and contracts cite — and 7:1 / 4.5:1 at the stricter AAA. Large means at least 24px, or 18.5px bold. The ratio itself runs from 1:1 (identical) to 21:1 (black on white).

Why does my grey that 'looks fine' fail?

Because screens and eyes disagree: luminance is computed after undoing gamma, so mid-greys carry far less contrast than they appear to on a bright display. The famous boundary is #767676 on white — the lightest grey that passes AA. Anything lighter reads fine on your monitor and fails on someone's phone in the sun.

How is the passing suggestion computed?

The tool walks your text color toward black or white — whichever direction gains contrast on this background — in one-percent steps and stops at the first shade that reaches the target. It keeps your hue's character as long as possible; it refuses honestly when even the extreme cannot pass, which happens on mid-toned backgrounds.

Does contrast apply to icons and UI parts too?

Yes, with its own rule: WCAG requires 3:1 for graphical objects and interface components — borders of inputs, icons that carry meaning, focus indicators. The AA-large verdict doubles as that check, since the threshold is the same 3:1.

Related tools