Colour Tools

Contrast Checker

All tools

Find out whether your text color is readable on its background, and by how much it passes or fails.

How it works

Four simple steps

1

Pick foreground color

Set text color hex for the element under test.

2

Pick background color

Set the surface color behind the text.

3

Compute contrast ratio

WCAG 2.1 ratio calculates from relative luminance.

4

Read AA/AAA pass

See whether normal and large text meet accessibility levels.

Contrast Checker

About Contrast Checker

The light grey caption text looks elegant on a white card, but an accessibility audit is coming. Enter both colors here to get the contrast ratio and an immediate pass or fail for each WCAG level, then darken the grey until it passes.

Choose Foreground or Background under the preview, then set that color with the picker, the HEX box (which also takes rgb() and hsl()) or the eyedropper. The ratio is calculated from relative luminance using the WCAG 2 formula and shown to two decimal places, with three badges: AA for normal text at 4.5:1, AA Large at 3:1 and AAA at 7:1. A preview card shows a large heading and a line of body text in your colors, and Copy Result copies both hex values, the ratio and the verdicts as text for a bug report.

The default pair, blue #3B82F6 on white, is a useful reminder: it looks strong but measures about 3.7:1, enough only for large text. WCAG counts large text as at least 24px regular or roughly 18.7px bold. Transparency is not taken into account, so for semi-transparent text, measure the color it actually renders as. The ratio also covers color only; thin fonts and tiny sizes can be hard to read even when they pass.

Once a pair passes, expand it into a usable scale with the shade generator, or fine-tune the failing color in the Color Picker. The calculation runs locally in your browser.

Keyboard shortcut

Ctrl Enter - Run tool
FAQ

Frequently asked questions

See all FAQs

Answers for this tool. For site-wide help, open the FAQ hub.

Text at least 24px in regular weight, or about 18.7px (14pt) in bold. Large text only needs 3:1 for AA, while normal text needs 4.5:1.

No. Alpha values are ignored and both colors are treated as solid. For translucent text or overlays, pick the blended color that actually appears on screen and test that.

The tool shows AA, AA Large and AAA. AAA for large text needs 4.5:1, which is the same threshold as the AA badge for normal text, so read that badge for it.

View more FAQs

Related tools

View all

Color Picker

Pick and convert colors.

Open

HEX to RGB

Convert HEX to RGB.

Open

RGB to HEX

Convert RGB to HEX.

Open

Color Converter

Convert between color spaces.

Open

Explore 321 free tools

Everything you need as a developer, marketer or creator - in one beautiful place.

Browse all tools