Enter a text color and a background color to get the WCAG 2.x contrast ratio, with pass/fail results for AA and AAA at normal and large text sizes, plus the 3:1 threshold for UI components and graphics such as input borders and icons. The sample block shows the pair as it will actually look.

When a pair fails, the suggestions keep the hue and saturation of your text color and only move its lightness, so you get the closest color that clears 4.5:1 (AA) and 7:1 (AAA) without changing the look of your palette more than needed. Click a suggestion to apply it.

  • Large text means at least 24px regular or roughly 18.66px bold (14pt bold).
  • The ratio is shown truncated to two decimals, so 4.499 reads as 4.49 and fails, just like the spec intends.
  • Colors are treated as opaque. If your text uses transparency, check the blended color instead.

Inputs accept hex, rgb(), hsl() and CSS color names. Everything runs locally in your browser.