Skip to content
Engyna

Color Contrast Checker

Check text and UI colors against WCAG AA and AAA contrast rules.

How to use the Color Contrast Checker

  1. 1Pick a text color and a background color.
  2. 2Read the contrast ratio and which WCAG levels pass.
  3. 3Use the suggested nearest passing colors.

About Color Contrast Checker

The Color Contrast Checker measures the contrast ratio between a text color and a background color and shows which WCAG 2 levels the pair passes: AA and AAA for normal and large text, and AA for UI components and graphics. Colors can be entered as hex, rgb(), hsl(), oklch() or CSS color names, including transparency, which is blended over the background as it would be on screen.

When a pair fails, the checker suggests the nearest lighter and darker versions of the text or the background color that reach 4.5:1 or 7:1 while keeping the same hue, so you can fix accessible colors without redesigning. A live preview shows headings, body text, small print, buttons and icons in your colors, and the pair can be copied as CSS. Swatches also show how the colors look with protanopia, deuteranopia, tritanopia and achromatopsia, with the contrast ratio for each.

Designers use the contrast checker to choose brand and interface colors, developers to verify a design before it ships, and content editors to check a button, banner or chart label. A quick WCAG contrast check takes seconds and catches one of the most common accessibility problems on the web.

Frequently asked questions

What contrast ratio do I need?

WCAG AA asks for at least 4.5:1 for normal text and 3:1 for large text (24px, or about 18.7px bold) and UI components. AAA asks for 7:1 for normal and 4.5:1 for large text.

How is the contrast ratio calculated?

WCAG compares the relative luminance of the lighter color (L1) and the darker color (L2) with the formula (L1 + 0.05) / (L2 + 0.05). The result ranges from 1:1 for two identical colors to 21:1 for black on white.

What counts as large text in WCAG?

Text of at least 18 point (24 CSS pixels) in regular weight, or at least 14 point (about 18.66 pixels) in bold. Large text needs 3:1 for AA and 4.5:1 for AAA instead of 4.5:1 and 7:1.

Do logos and disabled buttons need enough contrast?

No. WCAG exempts text in logos and brand names, text in inactive user interface components, purely decorative text and text that is not visible to anyone. All other text, including placeholder text, should meet the ratio.

Guides