WCAG Contrast Checker

Enter foreground and background colors to instantly get the WCAG 2.1 contrast ratio and pass/fail status for AA and AAA at every text size.

Contrast Ratio

AA Normal
Requires 4.5:1
AA Large
Requires 3:1
AAA Normal
Requires 7:1
AAA Large
Requires 4.5:1

Live Preview

Normal Text (16px)

The quick brown fox jumps over the lazy dog.


Large Text (24px / 18pt)

Accessible design matters.


Bold Large Text (18.67px / 14pt bold)

Bold text for UI components.


UI Component Sample

Color Details

Foreground RGB
Foreground Luminance
Background RGB
Background Luminance

Summary

Enter foreground and background colors to instantly get the WCAG 2.1 contrast ratio and pass/fail status for AA and AAA at every text size.

How it works

  1. Enter or pick a foreground (text) color using the hex input or color picker.
  2. Enter or pick a background color using the second hex input or color picker.
  3. The tool computes relative luminance for each color using the sRGB formula.
  4. The contrast ratio is displayed alongside pass/fail badges for all four WCAG criteria.
  5. Use the Swap button to reverse the two colors and re-check instantly.
  6. A live preview shows how your text looks at normal and large sizes on the chosen background.

Use cases

  • Verify UI designs satisfy WCAG 2.1 AA before shipping to production.
  • Audit existing web pages for accessibility compliance.
  • Choose accessible color combinations during brand or design system development.
  • Confirm legal compliance requirements for government, healthcare, or finance sites.
  • Test button label and icon color pairs against their background.
  • Educate designers and developers on accessibility color requirements.

Frequently Asked Questions

Last updated: 2026-07-01 · Reviewed by Nham Vu