Color Contrast Checker
Compare two colors and see whether their contrast meets common accessibility targets.
Browser-only processing
What Color Contrast Checker does
The ratio is calculated from relative luminance, with 1:1 representing identical luminance and 21:1 the maximum.
Supported formats or input: Accepts supported CSS color values and reports a numeric contrast ratio.
How to use Color Contrast Checker
- Set the text and background colors.
- Review the ratio and pass/fail results.
- Adjust either color until the relevant target passes.
Example and processing method
Example: Dark text on white often passes, while medium gray text may fail for normal-size copy.
sRGB channels are linearized before relative luminance and contrast are calculated.
Common mistakes and limitations
Common mistake: Large-text thresholds only apply when the rendered font meets the required size and weight.
Contrast is one accessibility factor; focus states, typography and color-independent cues also matter.
Privacy
Color values are calculated locally.
Related tools
Frequently asked questions
What ratio does normal text need?
WCAG AA commonly requires at least 4.5:1 for normal text.
Does a passing ratio guarantee accessibility?
No. It addresses color contrast only.