Design tool

Color Contrast Checker

Choose text and background colors to see their contrast ratio and WCAG result.

Runs in your browser. No upload.
Sample textThe quick brown fox jumps over the lazy dog.
Contrast ratio—
WCAG AA · normal text—
WCAG AA · large text—
WCAG AAA · normal text—

Change either color to check readability. WCAG thresholds are guidance for this color pair only.

About this tool

Color Contrast Checker made simple.

The checker calculates the WCAG contrast ratio for opaque sRGB colors. It helps review text readability but does not certify an entire page or replace an accessibility audit.

Guide

Using Color Contrast Checker

The Color Contrast Checker compares a text color with a background color and shows their contrast ratio, from 1:1 to 21:1. It then says if the pair passes the WCAG thresholds for normal text at AA, large text at AA and normal text at AAA. You pick both colors with a color picker. It checks only two plain colors, so it cannot say that a whole page is accessible.

How to use it

  1. Click the text color swatch and choose the color of your text. The starting value is a dark blue-grey, #172033.
  2. Click the background color swatch and choose the color behind the text. The starting value is white.
  3. Read the contrast ratio and the three Pass or Does not pass lines. The sample text above them shows the pair.
  4. Change either color until the lines you need say Pass.

Worked examples

The starting colors

You enter
Text
#172033
Background
#FFFFFF
You get
Ratio
16.27:1
Aa normal
Pass
Aa large
Pass
Aaa normal
Pass

Dark text on white is far above every threshold, including 7:1 for AAA normal text.

Run through the tool’s own code.

Grey that just passes, and grey that just fails

You enter
Pair a
#767676 on #FFFFFF
Pair b
#777777 on #FFFFFF
You get
Pair a
Ratio: 4.54:1; Aa normal: Pass; Aa large: Pass; Aaa normal: Does not pass
Pair b
Ratio: 4.48:1; Aa normal: Does not pass; Aa large: Pass; Aaa normal: Does not pass

One step in grey moves the ratio across the 4.5:1 line for normal text. The second grey still passes for large text, which needs only 3:1.

Run through the tool’s own code.

Red on white

You enter
Text
#FF0000
Background
#FFFFFF
You get
Ratio
4.00:1
Aa normal
Does not pass
Aa large
Pass
Aaa normal
Does not pass

Pure red on white reaches about 4:1. That is enough for large text but not for body text. The ratio is the same if you swap the two colors.

Run through the tool’s own code.

A pair that shows 4.50 but does not pass

You enter
Text
#647D66
Background
#FFFFFF
You get
Ratio
4.50:1
Aa normal
Does not pass
Aa large
Pass
Aaa normal
Does not pass

The real ratio is about 4.4995. The tool shows two decimals, so it reads 4.50, but it compares the unrounded number with 4.5. WCAG says the computed value is not rounded, so this is correct, though it looks odd.

Run through the tool’s own code.

When it helps

  • Check the color of body text and buttons on a web page design.
  • Pick a lighter or darker shade until a pair reaches the level you need.
  • Check slide or poster colors before printing or presenting.
  • Explain to a team why a light grey on white is hard to read.

Limits to keep in mind

  • It tests two opaque colors only. It cannot judge text over a photo, a gradient, a see-through color or a color that changes on hover.
  • The colors come from the browser's color picker, so you choose a color but cannot type a hex code into the page.
  • It shows AA for normal and large text and AAA for normal text. It does not show the AAA result for large text or any check for user interface parts.
  • It does not decide if your text is large. WCAG counts large text as at least 18 point, or 14 point bold, and it is up to you to know which case applies.

Tips

  • Aim for a little more than the minimum, because small changes in the screen or the font can make a borderline pair harder to read.
  • Contrast is not the only need. Do not use color alone to carry meaning, and test with real users when you can.
  • If a pair fails, move only the darker color darker, or the lighter color lighter, and watch the ratio.

Sources

Common questions

About Color Contrast Checker.

What contrast ratio do I need?

WCAG 2.2 level AA asks for at least 4.5:1 for normal text and 3:1 for large text. Level AAA asks for 7:1 for normal text and 4.5:1 for large text. Logos and purely decorative text have no requirement.

How is the contrast ratio worked out?

It is (L1 + 0.05) divided by (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 of the darker one. Relative luminance weighs red, green and blue after an sRGB adjustment. The result runs from 1 to 21.

What counts as large text?

WCAG defines large-scale text as at least 18 point, or 14 point and bold. That is about 24 pixels, or about 18.7 pixels bold, in a typical browser. The tool does not ask your font size, so decide this yourself.

Why does the page say Does not pass at 4.50:1?

The display rounds to two decimals, but the test uses the exact number. A pair that is really 4.4995 shows 4.50 and fails AA for normal text. WCAG says not to round up the ratio before comparing.

Does passing mean my website is accessible?

No. It means this one pair of colors meets a rule. Accessibility also depends on layout, text size, controls, keyboard use, images and more. The tool is no substitute for a full accessibility audit.

Can I check text on top of an image?

Not with this tool. It takes one solid text color and one solid background color. For an image, check the worst spot behind the text by sampling its color, or add a solid panel behind the text.

Is my color choice sent anywhere?

No. The ratio is worked out in your browser and the page says nothing is uploaded. Note the hex values yourself if you want to keep them.

What is a good WCAG contrast ratio?

WCAG AA requires 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 for normal text and 4.5:1 for large text.

Does this certify my website as accessible?

No. It checks only the two selected colors. Accessibility also depends on layout, text, controls and other factors.