EN

Color Contrast Checker

Enter a text color and a background color to see the contrast ratio and whether it passes WCAG 2.x. If it fails, the checker suggests the closest color that passes.

Large text sample

This is normal body text. Check that it is easy to read.

●
Contrast ratio2.72:1
Normal text AA4.5:1✕ Fail
Normal text AAA7:1✕ Fail
Large text AA3:1✕ Fail
Large text AAA4.5:1✕ Fail
UI components & graphics AA3:1✕ Fail

Nearest passing color (4.5:1)

#8164CF

How to use it

  1. Enter the text (foreground) and background colors as HEX, RGB or HSL, or use the pickers.
  2. Read the ratio and the pass/fail results for normal text, large text and UI components.
  3. If a check fails, use the suggested color: same hue, only lighter or darker.

WCAG 2.x contrast requirements

ContentAAAAA
Normal text4.5:17:1
Large text (24px+, or 18.66px+ bold)3:14.5:1
UI components and graphics (1.4.11)3:1—

The ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 of the darker one. It runs from 1:1 (same color) to 21:1 (black on white).

How we show the ratio

Pass or fail is decided on the exact ratio. The ratio shown is cut to two decimals, never rounded up, so a pair at 4.497:1 shows 4.49:1 and fails AA, as it should. Some checkers round it to 4.50:1.

This checker covers WCAG 2.x contrast for solid colors only. It does not test transparency, text over images or gradients, or the newer APCA method, and contrast is only one part of accessibility.

Frequently asked questions

What is a good contrast ratio?

For body text aim for at least 4.5:1 (WCAG 2.x AA). 7:1 meets AAA. Large text needs 3:1 for AA, and icons, borders of inputs and other UI parts need 3:1.

What counts as large text?

WCAG defines large text as at least 18 point (about 24 CSS px) regular, or 14 point (about 18.66 CSS px) bold.

Does the order of the two colors matter?

No. The ratio is always the lighter luminance over the darker one, so swapping text and background gives the same number.

Is this the same as a colour contrast checker?

Yes, colour is the British spelling. The checks follow the same WCAG 2.x standard used in the UK, US and EU.

Related tools