HomeDeveloper toolsColor Contrast Checker

Color Contrast Checker

Check text color contrast with WCAG 2 ratios.

Calculate the WCAG 2 contrast ratio between two HEX colors.

Sample text

This checks solid sRGB colors using WCAG 2 ratios. Verify real text size and background in your layout.

How to use the color contrast checker

Enter text and background HEX colors to calculate their WCAG 2 contrast ratio. The tool reports AA and AAA text thresholds.

Example

Black text on white has a 21:1 ratio and passes all listed text thresholds.

Good to know

The calculation assumes solid sRGB colors. Check the real rendered size and background before claiming accessibility compliance.