Skip to main content

WCAG Color Contrast Checker

Calculate color contrast ratio and verify WCAG AA/AAA accessibility compliance

Choose Colors

Contrast Preview

Sample Headline TextThis preview text demonstrates how your text reads over the chosen background color.
Contrast Ratio
17.85:1
WCAG AA (Normal Text)
PASS
WCAG AA (Large Text)
PASS
WCAG AAA (Normal Text)
PASS

Large text means at least 24 CSS pixels, or at least 18.66 CSS pixels when bold. The AAA result uses the normal-text threshold; this checker does not calculate AAA large-text or non-text component contrast.

Was this WCAG Color Contrast Checker helpful?

Help us keep tools reliable, fast, and bug-free.

What you can do with WCAG Color Contrast Checker

  • Check color contrast
  • Verify wcag aa compliance

How this color and design utility works

Calculate the WCAG contrast ratio between a foreground text color and a background color, then show AA and AAA results.

Example input

Foreground: #ffffff, Background: #7c3aed

Example output

Contrast Ratio: 5.70:1 | WCAG AA Normal Text: PASS | WCAG AA Large Text: PASS | WCAG AAA Normal Text: FAIL

Practical workflow

  1. Choose a foreground text color with the color picker or enter a 3- or 6-digit hexadecimal value.
  2. Choose or enter a 3- or 6-digit hexadecimal background color.
  3. Read the live contrast ratio and the AA normal text, AA large text, and AAA enhanced results.
  4. Inspect the fixed heading and body sample, then enter your actual design colors to check a specific pair.

Common use cases

  • Auditing design tokens for web accessibility (a11y) compliance.
  • Comparing a foreground and background pair before applying those colors to a design token.
  • Reviewing whether a text color meets AA normal text, AA large text, and AAA enhanced thresholds.
  • Previewing how a heading and smaller body sample look on the chosen color pair.

Important notes and limitations

  • Calculates sRGB relative luminance using the WCAG formula and compares the unrounded ratio to each threshold; the displayed ratio is rounded to two decimal places.
  • The AAA result applies the 7:1 normal-text threshold. AAA large-text and non-text component contrast are not calculated.
  • The preview uses a fixed bold heading and smaller body sample. The checker does not inspect your website, test UI components, or suggest replacement colors.
  • Accepts 3- or 6-digit hexadecimal colors, with or without a leading #; other formats are rejected with an input error.

WCAG 2.1 & APCA contrast calculation CLI

Audit web page color contrast with lighthouse CLI

npx lighthouse https://easyutils.dev --only-categories=accessibility --view

Runs automated accessibility audit flagging any text elements that fall below WCAG 4.5:1 ratio.

WCAG AA/AAA compliance & subpixel antialiasing

Contrast ratio fails WCAG 2.1 AA (requires minimum 4.5:1 for normal text)

Cause: Foreground text lightness is too close to background container lightness.

Solution: Adjust background or text color until relative luminance ratio meets 4.5:1 (normal text) or 3:1 (large text >=18pt).

Continue your workflow

Frequently asked questions

Which contrast thresholds does this checker show?

It checks AA normal text at 4.5:1, AA large text at 3:1, and AAA normal text at 7:1. It does not separately calculate AAA large-text or non-text component contrast.

Will the checker suggest a replacement color when a pair fails?

No. It reports the contrast ratio and pass or fail status for the entered pair; it does not adjust colors or suggest alternatives.

Can I enter RGB or HSL values directly?

No. The text fields accept 3- or 6-digit hexadecimal values, such as #abc or #aabbcc. Use the color pickers to select colors visually.