Color Contrast Checker

Choose a text color and a background color. The ratio and the pass or fail results update instantly.

Loading tool…

  • Free
  • No sign-up
  • Runs in your browser

How to use the contrast checker (wcag)

  1. Set the text color with the picker or by typing a code.
  2. Set the background color.
  3. Read the ratio and the pass or fail table.
  4. If it fails, press Use it to apply the closest passing color.

What the ratio means

The contrast ratio compares the brightness of two colors, from 1:1 (identical) to 21:1 (black on white). The Web Content Accessibility Guidelines (WCAG) set minimum ratios so that people with low vision or color blindness, and anyone reading a phone in sunlight, can still read your text.

LevelNormal textLarge textIcons and controls
AA (the usual legal and design standard)4.5:13:13:1
AAA (enhanced)7:14.5:1not defined

Large text means 18 pt (24 px) or larger, or 14 pt (about 19 px) and bold.

Common mistakes

  • Light gray text on white. #999999 on white is only 2.8:1. Use #767676 or darker to reach 4.5:1.
  • White text on bright colors. White on yellow, lime, orange or sky blue almost always fails. Use dark text on those backgrounds.
  • Text over photos. Contrast changes across the image. Add a dark overlay or a solid panel behind the words.
  • Placeholder text. Hint text inside form fields must meet the same ratio as other text.
  • Relying on color alone. A red error message also needs an icon or words, because some users cannot tell red from green.

Who benefits

About 1 in 12 men and 1 in 200 women have some form of color vision deficiency, and far more people have reduced contrast sensitivity as they age. Good contrast also makes pages easier for everyone to read on a dim or glare-covered screen.

Frequently asked questions

What contrast ratio do I need?

For normal body text, at least 4.5:1 to meet WCAG AA. Large text and interface icons need at least 3:1.

Is WCAG AA a legal requirement?

Accessibility laws in many countries, including the ADA in the United States and the European Accessibility Act, refer to WCAG AA. Check the rules that apply to you.

Does contrast apply to logos?

No. Logos and purely decorative text are exempt, although readable logos are still a good idea.

Is anything I enter sent to a server?

No. The tool runs entirely in your browser, so what you type never leaves your device.

Related tools