Color Contrast Checker (WCAG)

Check whether a text colour and background colour meet WCAG contrast requirements. Enter hex codes or pick colours.

Contrast ratio: :1

CheckNeedsResult
AA normal text4.5:1
AA large text3:1
AA UI components3:1
AAA normal text7:1
AAA large text4.5:1

How it works

The tool converts each colour to relative luminance using the WCAG formula, then computes (L1 + 0.05) / (L2 + 0.05). The ratio is rounded down to two decimals so a 4.499 never shows as a pass.

FAQ

What contrast ratio does WCAG require?

WCAG 2.x level AA requires at least 4.5:1 for normal text and 3:1 for large text and for user interface components and graphics. Level AAA requires 7:1 for normal text and 4.5:1 for large text.

What counts as large text?

Text of at least 18 point (24 CSS pixels), or at least 14 point (about 18.66 CSS pixels) when bold.

How is the ratio calculated?

Ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter colour and L2 of the darker, with luminance computed from linearised sRGB values.

Is my data uploaded?

No. Everything is calculated in your browser and nothing is stored.

Tell us what to fix

Please do not enter your name, email, or personal information.

How useful was this tool? (1–5)

May we quote your comment anonymously?

Free tool, provided as is, with no guarantee. Passing a contrast check does not by itself make a site accessible or legally compliant. Please do not enter personal information in feedback.