WHAT IT DOES
See whether two colors can be read together.
Pick or enter foreground and background CSS colors and get the WCAG 2.x relative-luminance contrast ratio with Normal and Large text AA and AAA results. The preview updates as you work, and alpha colors are composited before the ratio is calculated so a translucent label is not reported as if it were opaque.
Why use it?
Use it to check whether a foreground/background pair meets the displayed text-contrast thresholds, rather than judging readability by hue alone.
How to use this tool
- Enter or pick the actual foreground and background colors, including alpha when relevant.
- Read the ratio and the Normal and Large text verdicts. Opaque black on white is a useful reference at 21:1.
- Match the verdict to your actual text size and weight. Check other backgrounds separately, especially images or gradients; this pairwise calculation is not a complete accessibility audit.
Details and limitations
- The visual controls reuse the site's CSS color parser and picker, including modern rgb(), hsl(), LAB, OKLCH, and alpha syntax.
- Normal text uses 4.5:1 for AA and 7:1 for AAA; large text uses 3:1 for AA and 4.5:1 for AAA.
- Transparent backgrounds are composited over white, while a translucent foreground is composited over the selected background.
- Normal and swapped evaluations are shown together, and copy and clear are available without sending either color to a server.