Tool 08 / 08 · Color utilities · instant

Contrast Checker

Test a text color against a background color and see instantly whether it meets WCAG AA and AAA accessibility standards.

Text color
Background color
Contrast ratio 16.19:1 Excellent

Large text — 24px headline

Normal text (16px) — The quick brown fox jumps over the lazy dog. Readable body copy needs at least a 4.5:1 contrast ratio.

AA Normal text≥ 4.5:1
AA Large text≥ 3:1
AAA Normal text≥ 7:1
AAA Large text≥ 4.5:1

Large text = 24px+ regular, or about 18.67px+ bold. Details in WCAG Contrast Ratios Explained.

Try an example

★ Favorites

Hit the ★ Save button to keep a pair here — saved in this browser only.

History

Pairs you check will appear here — saved in this browser only.

Example

Same photo, one pass and one fail

Two color pairs pulled from this lamp-lit photo's palette. Beautiful together in the frame — but only one of them is readable as text.

Rows of lit oil lamps in warm amber darkness
Lamplight gold on black — clearly readable.
9.52 : 1 · AA + AAA PASS
Ember on ember — looks moody, reads terribly.
1.98 : 1 · FAIL
Check it yourself

How the ratio is calculated and rounded

Each HEX code becomes three sRGB channel values from 0 to 255, and the checker runs the WCAG 2.x formula on them.

#767676 on #FFFFFF4.54 · AA normal pass
#767776 on #FFFFFFshows 4.50 · AA normal fail
#777777 on #FFFFFF4.48 · large text only
#959595 on #FFFFFFshows 3.00 · fails every level

The readout rounds to two decimals, but the badges use the unrounded ratio. #767776 is one green step away from #767676; its true ratio is 4.496, so the readout says 4.50 while AA Normal says FAIL. #959595 shows 3.00, is really 2.995, and fails all four. The chips under Examples, Favorites, and History round to one decimal, so #777777 (fails AA Normal) and #767676 (passes) both read 4.5:1. Near a threshold, trust the badge rather than the number.

Input rules

What the fields accept, and what the buttons change

Both text fields take HEX only. A value they can't read gets a red border, and the ratio, badges, and preview keep showing the last valid pair until you fix it.

Limits

What this checker does not measure

The number describes two flat sRGB colors, nothing more.

About this tool

What is a WCAG contrast checker?

A contrast checker measures the brightness difference between a text color and its background, expressed as a ratio from 1:1 (invisible) to 21:1 (black on white). The Web Content Accessibility Guidelines (WCAG) define minimum ratios so that text stays readable for people with low vision — and for everyone reading a phone in sunlight. This tool computes the exact WCAG 2.x relative-luminance formula and grades your pair against the four AA and AAA text-contrast thresholds at once.

Exact WCAG math

Uses the official gamma-corrected relative luminance formula — the same numbers an accessibility audit will produce.

Big, honest preview

See your actual pair rendered as a 24px headline and 16px body text while you adjust — not just a number.

AA and AAA at once

Four instant verdicts: AA and AAA, for normal and large text. No mental lookup tables.

One-click swap

Flip text and background to preview the inverted pair. The ratio stays the same; a real dark theme uses different colors, so test those too.

How to use

Check a color pair in three steps

  1. Pick your text color

    Click the big swatch to open the color picker, or type a three- or six-digit HEX code into the field below it.

  2. Pick the background

    Same on the right side. The preview and the ratio update live as long as both fields hold a valid code.

  3. Read the verdicts

    A green PASS means the pair clears that row's threshold; read the row for your text size. If AA Normal fails, move the text further from the background in lightness and keep the hue.

Beyond the ratio

Passing the number isn't the whole job

The ratio is necessary, not sufficient. Four things the number won't catch:

Keep going

Related tools & guides

FAQ

Frequently asked questions

What contrast ratio do I actually need?

For body text, 4.5:1 (WCAG AA) is the number to remember — it's what accessibility laws generally reference. Large text (24px+ regular, or about 18.67px+ bold) can go down to 3:1. AAA raises those bars to 7:1 and 4.5:1 for reading-heavy content.

What counts as "large text"?

At least 18pt (24px) at regular weight, or at least 14pt (about 18.67px) when bold. Everything smaller is judged by the stricter "normal text" thresholds.

Is AAA required?

Rarely. AA is the practical legal and industry baseline. AAA is worth targeting for documentation, articles, and other long-form reading surfaces — treat it as a quality goal for body text, not a blanket requirement.

Does this apply to buttons and icons too?

Since WCAG 2.1, non-text UI elements — icons, input borders, focus rings — need at least 3:1 against adjacent colors. Test those pairs here the same way; use the 3:1 "AA Large" badge as your reference.

My brand color fails. Do I need a new brand?

No — you need a darker or lighter step of the same hue for text use. Keep the hue and saturation, shift the lightness until the ratio passes, and keep the original shade for large decorative elements. Details in WCAG Contrast Ratios Explained.