Technology · Accessibility utility

WCAG Contrast Checker

Check colour contrast and preview readable text against WCAG AA and AAA.

Reserved ad space · responsive display

Colours to compare

Enter two six-digit hex colours, or use the colour pickers. The preview and results update instantly.

Live text preview

Readable text matters

The quick brown fox jumps over the lazy dog.

Small text example · 14px

Contrast results

Contrast ratio
—
Normal text · AA (4.5:1)—
Large text · AA (3:1)—
Normal text · AAA (7:1)—
Large text · AAA (4.5:1)—

These checks apply to text contrast under WCAG 2.2. A passing contrast ratio alone does not establish overall accessibility compliance.

More Information

How to use this contrast checker

Choose a foreground text colour and a background colour. You can paste a six-digit hexadecimal value such as #172B4D, or select a colour with the browser picker. The contrast ratio, pass/fail indicators and text preview update automatically. Use Swap colours to reverse the foreground and background.

How contrast is calculated

WCAG contrast is the ratio between the relative luminance of the lighter and darker colours: (Lighter luminance + 0.05) ÷ (Darker luminance + 0.05). Each sRGB channel is linearised before its contribution to luminance is calculated. The maximum ratio is 21:1 for black against white; identical colours have a ratio of 1:1.

WCAG AA and AAA thresholds

WCAG AA requires at least 4.5:1 for normal text and 3:1 for large text. AAA requires 7:1 for normal text and 4.5:1 for large text. Large text generally means at least 18pt regular or 14pt bold. The displayed thresholds are based on WCAG 2.2 Success Criteria 1.4.3 and 1.4.6.

Practical example

Black text (#000000) on white (#FFFFFF) produces a 21:1 ratio, passing all four checks. White text on white has a 1:1 ratio and fails all four. Test your real interface colours rather than relying on a colour's appearance alone.

Limitations

This tool checks opaque hex colours, not gradients, transparency, image backgrounds or text effects. Non-text interface components may have other contrast requirements. Colour contrast is only one part of accessibility: keyboard support, semantics, focus visibility and understandable content also matter.

Frequently asked question

Does passing AA mean my website is WCAG compliant? No. It means the selected colour pair meets the stated text contrast threshold; an accessible website must satisfy many additional success criteria.

Reference: W3C — Understanding Contrast (Minimum).

Reserved ad space · after calculator