How to use this developer tool
- Enter foreground and background colors.
- Run the contrast check.
- Review WCAG results for normal, large, and UI text.
- Adjust either color and test again.
Measure color contrast accurately using relative luminance and get WCAG pass/fail results for text and interface components.
Normal text preview
Large bold text preview
Calculates relative luminance using linearized sRGB values and applies WCAG contrast thresholds.
A ratio of at least 4.5:1 is required for typical body text under WCAG AA.
Foreground #ffffff on background #8b5cf6.
The output reports AA pass or fail for normal text and large text separately.
WCAG AA generally requires at least 4.5:1 for normal text.
Darken the darker color or lighten the lighter color until the ratio passes.
The output recommends black or white using background luminance.
Transparent foreground colors are composited over the supplied background before contrast is calculated.
HEX, RGB(A), HSL(A), and selected named colors. Output is JSON.