Color contrast checker

Pick a text color and a background color to see the contrast ratio and whether it passes WCAG.

7.12contrast ratio

Type a color as #RRGGBB, #RGB or rgb(r, g, b), or use the color picker.

Check the colors on the real pageSend the page as a review link. Reviewers click any text they find hard to read and say so, pinned to that spot.

How to use the color contrast checker

  1. Pick two colorsEnter the text color and the background color, or use the color pickers.
  2. Read the ratioThe contrast ratio updates instantly, from 1:1 (no contrast) to 21:1 (black on white).
  3. Check the resultsSee whether it passes WCAG AA and AAA for normal text, large text and buttons.
  4. Check the real pageSend the page as a review link so reviewers can flag text that's hard to read.

What it checks

AA, normal textAt least 4.5:1. The level most sites and laws aim for.
AAA, normal textAt least 7:1. The stricter level, easier for everyone to read.
Large text3:1 for AA and 4.5:1 for AAA. Large means at least 24 pixels, or 19 pixels and bold.
Buttons and iconsAt least 3:1 between a button, icon or form border and what is around it.

What color contrast is

Contrast is how different two colors look in brightness. Text with too little contrast against its background is hard to read, especially on a phone in sunlight, for older readers, and for people with low vision or color blindness. The contrast ratio puts a number on it, from 1:1 for two identical colors to 21:1 for black on white.

What WCAG asks for

The Web Content Accessibility Guidelines (WCAG) set two levels. AA is the common target: 4.5:1 for normal text, and 3:1 for large text, buttons, icons and form borders. AAA is stricter: 7:1 for normal text and 4.5:1 for large text. Many accessibility laws and policies point to WCAG AA.

Common problems

  • Light grey text. Soft grey on white looks calm in a design file but often fails AA. Check captions, dates and form hints.
  • Text on brand colors. White text on a mid-tone orange, green or blue is often close to the line. Darken the color slightly or make the text larger and bold.
  • Text over photos. Contrast changes across the image. Add a dark overlay behind the text.

Beyond the numbers

A contrast checker tests two colors at a time. Real pages have dozens. Our guide to getting accessibility feedback on a website covers how to review a whole page with your team or client.

Questions

What is a good contrast ratio?

For normal text, at least 4.5:1 to meet WCAG AA, and 7:1 to meet AAA. Large text and buttons need at least 3:1 for AA.

What counts as large text?

WCAG treats text as large from about 24 pixels, or about 19 pixels when it is bold.

Does color contrast affect SEO?

Not directly, but readable pages keep people reading, and accessibility is a legal requirement for many businesses.

Which color formats can I use?

Hex such as #1A1713, short hex such as #333, or rgb(26, 23, 19). You can also use the color pickers.

How is the ratio worked out?

From the relative brightness of each color, using the formula in WCAG 2. The result is rounded down, so a color pair never shows as passing when it falls just short.

Is this tool free?

Yes. It runs in your browser with no signup and no limits.

More free tools