Home / Colour / Contrast Checker

Contrast Checker

Put a text colour against a background colour and get the exact WCAG contrast ratio, honest pass or fail marks for AA and AAA, and a live preview of real text. The maths runs in your browser — the colours you test never leave your device.

—

contrast ratio

—AA · normal text · needs 4.5:1
—AA · large text · needs 3:1
—AAA · normal text · needs 7:1
—AAA · large text · needs 4.5:1

A heading in your colours

This paragraph is ordinary body text, roughly the size most reading happens at. If you can read it comfortably here, your visitors probably can too — and the badges above say whether the rules agree.

And this is the small print: captions, footnotes and legal lines. Small text is where weak contrast gets found out, which is why the standards hold it to the strictest ratio.

Overview

Colour pairs that look elegant to a designer can be quietly unreadable to a large share of visitors — older eyes, tired eyes, eyes looking at a phone in bright sunlight. The contrast ratio turns that vague worry into a number you can act on. This checker does the full WCAG calculation for any foreground and background pair, then translates the number into the four verdicts that matter: AA and AAA, for normal text and for large text.

The preview panel is deliberately plain. It shows a heading, a paragraph and a line of small print in exactly your two colours, because a ratio alone cannot tell you how a combination feels to read. Pair the number with your own eyes and you get both halves of the decision: what the standard requires, and what the reading experience is actually like.

What is contrast ratio?

A contrast ratio compares the relative luminance — roughly, the perceived brightness — of two colours, and expresses it as something like 7:1. Pure black on pure white gives the maximum, 21:1. Identical colours give 1:1, which is to say invisible text. Every real pairing lives somewhere between those extremes, and most of the interesting design arguments happen between 3:1 and 8:1.

The WCAG guidelines (the Web Content Accessibility Guidelines, maintained by the W3C) set the thresholds the badges on this page use. Level AA is the standard most laws and procurement rules point to: 4.5:1 for normal text, 3:1 for large text. Level AAA is the stricter tier: 7:1 for normal text and 4.5:1 for large text. "Large" has a specific meaning too — about 24 pixels and up, or about 19 pixels if the text is bold.

Features

Benefits

Who can use it

Designers choosing brand palettes, developers handed a colour scheme and told to "make it accessible", content teams checking that last year's template still holds up, and site owners who simply want their words read. It is also a kind first tool for students of accessibility: the standards stop being abstract the moment you watch a badge flip from FAIL to PASS because you darkened a grey by two steps.

How to use

  1. Set the text colour with its picker, or type its HEX code.
  2. Set the background colour the same way.
  3. Read the big ratio in the middle of the panel.
  4. Check the four badges for the level (AA or AAA) and text size you care about.
  5. If a badge fails, darken or lighten one colour in small steps until it passes — then confirm in the preview that the pair still looks like your design.
  6. Use Swap to test the reverse pairing before you settle.

Frequently asked questions

What ratio should I aim for?

For body text, treat AA's 4.5:1 as the floor and AAA's 7:1 as a comfortable target. Headings and other large text can live happily at 3:1 under AA. If a pair only just passes, remember that real screens and real lighting are less kind than this page.

Why does a pair that looks fine to me fail?

Your eyes are not the test audience. Contrast perception drops with age, low vision, glare and poor displays, and it also drops for thin fonts even at large sizes. The ratio measures the colours, not the viewer — which is the point of having a standard at all.

Does font size or weight change the result?

The ratio itself never changes, but the threshold does: large text (about 24px, or 19px bold) is allowed a lower ratio because bigger letterforms are easier to resolve. Delicate, thin typefaces deserve extra headroom beyond the minimums.

What about text over photos or gradients?

WCAG ratios assume flat colours. Over an image, the honest approach is to test against the lightest and darkest parts of the image behind the text — or add a solid backdrop or shadow so the pairing becomes measurable. This checker handles the flat-colour case properly.

Is AA compliance a legal requirement?

It depends on your country and sector; many public-sector and enterprise rules reference WCAG AA explicitly. This tool tells you whether a colour pair meets the technical thresholds — it cannot certify a whole website, which involves far more than colour.

Can I trust the calculation?

Yes — it follows the WCAG definition of relative luminance, including the sRGB gamma curve, and divides the lighter luminance by the darker with the specified 0.05 offset. Black on white returns 21:1 here, exactly as the specification says it should.

Conclusion

Readable text is not a style preference; it is the whole job of text. Two colours, one honest number, four clear verdicts — check your pairings here before they ship, and nobody has to squint at your words again.

Related tools

ColourColour StudioPick a colour and get its HEX, RGB and HSL values plus shades and tints. ColourPalette GeneratorHarmonious five-colour palettes generated from colour theory. ColourGradient GeneratorBuild linear and radial CSS gradients and copy the finished code.