Color Contrast Checker

Check the contrast ratio of text and background colors against WCAG 2.2 AA and AAA. Enter HEX or RGB values, preview readable text, and try a suggested adjustment when a pair does not meet your target.

Enter a 3- or 6-digit HEX code (such as #111 or #111111), rgb(17, 17, 17), or 17, 17, 17. Solid sRGB colors only; alpha, gradients and images are not supported.

Live preview and WCAG results

Results update when both entered colors are valid. The pass/fail labels describe this color pair, not an entire website.

Sample heading Aa

This is normal-sized sample text on your selected background.

Improve low-contrast colors

Keep the background and adjust the text color, or keep the text and adjust the background. Suggestions are verified after rounding to sRGB HEX and are only applied when you press a button.

How to check color contrast

  1. Set the text and background. Type HEX/RGB values, choose the browser color inputs or use a sample pair.
  2. Read the ratio. Identical colors produce 1:1; black and white produce 21:1. Normal text and large text have different WCAG thresholds.
  3. Try a correction. Choose to adjust text or background; check the newly calculated ratio, then undo if needed. Copy CSS once you are happy with the actual pair.

WCAG 2.2 AA and AAA contrast requirements

ContentAAAAA
Normal textAt least 4.5:1At least 7:1
Large textAt least 3:1At least 4.5:1
Essential UI boundaries and non-text graphics (where 1.4.11 applies)At least 3:1No separate AAA requirement

For WCAG contrast testing, “large text” generally means at least 18pt (24 CSS px), or 14pt (about 18.7 CSS px) in bold. Contrast alone cannot establish whether a control or page is fully accessible.

Example: #999999 text on white does not reach AA for normal text. Black on white is 21:1. A colorful button may also need separate contrast checks for its label and its boundary.

When to test your actual interface

This checker compares two opaque sRGB colors. It does not composite transparent layers, inspect pictures or gradients, detect the true background behind text, or audit focus indicators and interaction states. Check hover, focus, error, selected and disabled states in the real layout. Read the official WCAG text contrast guidance and non-text contrast guidance.

To choose new colors, try Color Picker, Color Wheel or color palettes. The Color Converter helps you obtain HEX and RGB values.

Comparing more than one text/background pair? Use the Color Contrast Matrix to evaluate 2–8 colors in one grid. Color calculations run locally in your browser. No login is required; your entered colors are not uploaded.