Color contrast checker

Calculate the contrast of two opaque colors and WCAG 2.2 AA/AAA text thresholds.

HEX with 3/4/6/8 digits; RGB 0–255 or percentages; HSL hue 0–360 and saturation/lightness 0–100%. Use commas and alpha 0–1. Contrast accepts opaque colors only.

WCAG 2.2: AA requires 4.5:1 for normal text and 3:1 for large text; AAA requires 7:1 and 4.5:1. Large text is 18pt or 14pt bold. Pass/fail uses the unrounded ratio; this is not an accessibility certification.

How to use

Enter opaque text/background colors and calculate. Read the ratio and each threshold result using your actual text size.

Try an example

Black #000000 on white #FFFFFF gives 21:1; the same color on itself gives 1:1.

Support & limits

WCAG 2.2: AA requires 4.5:1 for normal text and 3:1 for large text; AAA requires 7:1 and 4.5:1. Large means 18pt or 14pt bold. Decisions use the unrounded ratio; display rounds to four decimals. W3C references: Understanding SC 1.4.3 and SC 1.4.6.

Common questions

Does a pass mean a website fully meets WCAG?

No. This checks only the contrast ratio of two colors. Fonts, images, interactive states and other accessibility requirements need separate review.

Related tools