Browser-local developer utility

Color Contrast Checker

Enter foreground and background HEX colors to calculate their contrast ratio and evaluate common WCAG 2.x text thresholds.

Choose two colors to begin.

How it works

Each sRGB channel is linearized, then combined as relative luminance using the WCAG 2.x coefficients. Contrast is (lighter luminance + 0.05) ÷ (darker luminance + 0.05). Normal-text thresholds are 4.5:1 for AA and 7:1 for AAA; large-text thresholds are 3:1 and 4.5:1.

Limits and assumptions

This numeric check covers opaque six-digit HEX colors and WCAG 2.x text contrast thresholds. It does not evaluate font size, weight, gradients, transparency, images, focus states, non-text contrast, or overall accessibility conformance.

Related tools