Color Contrast Checker

Enter a text color and a background to see the contrast ratio and WCAG AA and AAA results.

Sample Text 123

Contrast Ratio

21:1

Normal Text

AA (4.5:1) Pass
AAA (7:1) Pass

Large Text (18pt+)

AA (3:1) Pass
AAA (4.5:1) Pass

Suggested Color Combinations

The tool compares the brightness of two colors with the WCAG 2.1 formula and shows a ratio between 1:1 and 21:1. The math runs in the page and your colors are never sent anywhere. With the background fixed at #FFFFFF, these are the results for different text colors.

Text colorRatioNormal AA (4.5:1)Normal AAA (7:1)Large AA (3:1)
#00000021.00:1PassPassPass
#5959597.00:1PassPassPass
#7676764.54:1PassFailPass
#7777774.48:1FailFailPass
#9999992.85:1FailFailFail

#767676 and #777777 look identical, yet one passes and one fails. On white, body gray should not be lighter than #767676.

What counts as large text

Large text means 18pt or bigger, or 14pt bold. In CSS that is roughly 24px, or 18.66px bold, so a 14px bold button label still needs 4.5:1. Large text needs 3:1 for AA and 4.5:1 for AAA. Graphics such as icons and input borders also need 3:1, so read the Large AA column for them.

Only HEX with 3 or 6 digits is accepted. rgb(0,0,0) and black are not, and a semi-transparent color has to be entered as the opaque HEX you see over the real background. Order does not change the ratio, so the swap button only flips the preview. To build candidate colors, try the color converter.