Check WCAG 2.2 Color Contrast Ratios for Web Design

Verify AA and AAA text readability, understand relative luminance ratios, and test accessible light and dark UI color pairs instantly.

Low-contrast gray text on light backgrounds or muted labels on dark cards hurts usability on mobile screens and fails WCAG 2.2 accessibility compliance. Checking exact luminance ratios during design prevents costly UI rework after launch.

WCAG 2.2 Contrast Thresholds at a Glance

| Content Category | Level AA Minimum | Level AAA Enhanced | |---|---|---| | Normal body text (< 18pt / 24px) | **4.5 : 1** | **7.0 : 1** | | Large text (≥ 18pt or ≥ 14pt bold) | **3.0 : 1** | **4.5 : 1** | | Active UI icons, borders & focus rings | **3.0 : 1** | N/A |

How Contrast Ratio Is Computed

WCAG calculates relative luminance from linearized sRGB red, green, and blue channels ($L = 0.2126R + 0.7152G + 0.0722B$), then compares the lighter and darker colors via $(L_1 + 0.05) / (L_2 + 0.05)$. Pure black on pure white yields the maximum **21 : 1** ratio.

Practical Tips for Accessible Palettes

- **Test both light and dark modes:** Use the **Swap Colors** button in the [WCAG Color Contrast Checker](/tools/color-contrast-checker) to confirm reversed themes still clear 4.5 : 1. - **Avoid light grays for body copy:** Shades like `#9ca3af` on white drop below 2.6 : 1; shift body text closer to `#4b5563` or darker for crisp AA compliance. - **Check primary buttons:** Ensure white text on brand indigo or emerald buttons passes at least 4.5 : 1 for normal button labels.