What is CSS Color Contrast Checker?
WCAG contrast ratio measures the luminance difference between two colors. A ratio of 4.5:1 meets the AA standard for normal text, and 7:1 meets AAA. These thresholds help ensure that people with low vision, color vision deficiency, or who are reading on a screen in difficult lighting can still read the content. This tool calculates the precise ratio from the hex values you enter and shows whether the combination passes the level you need, helping designers and developers check color combinations before publishing.
Quick answer
Check whether two color combinations meet WCAG contrast standards before publishing. The tool calculates the precise ratio and tells you whether normal text, large text, and UI components pass AA or AAA levels.
Limitations
- The color picker returns hex values only. It does not support RGB, HSL, or named color inputs directly.
- The tool checks solid color pairs. It does not evaluate contrast on gradient text, box-shadow text, or background images where luminance varies across the element.
- Contrast ratios are calculated from the colors you enter. If either color is transparent the result will not reflect the actual visible contrast against the underlying page background.
How to use this tool
- Enter the foreground color using a hex code, RGB value, or color picker.
- Enter the background color the same way.
- Read the contrast ratio result and the WCAG AA and AAA pass/fail indicators for normal text and large text.
- Adjust either color until the ratio meets your target accessibility level.
What you can use it for
- Check whether body text on a light background meets WCAG AA readability standards.
- Validate brand color combinations across buttons, badges, and UI components.
- Prepare accessible design specs before handing off to development.