What is the Color Contrast Checker?
Text needs enough contrast with its background to be readable for everyone, including people with low vision, color blindness or a phone screen in sunlight. The Web Content Accessibility Guidelines (WCAG 2.2) define a contrast ratio from 1:1 (no contrast) to 21:1 (black on white) and set minimums: 4.5:1 for normal text and 3:1 for large text at level AA.
This color contrast checker calculates the exact ratio, shows which WCAG levels pass, previews the colors and can fix a failing text color by finding the closest shade that passes. It accepts any CSS color, including hex, rgb(), hsl() and names.
How to use the Color Contrast Checker
- Enter or pick the text color and the background color.
- Read the contrast ratio and the pass/fail results for AA and AAA.
- If it fails, click Fix text color for AA to get the closest passing color.
Frequently asked questions
What contrast ratio do I need?
WCAG AA, the level most laws and policies require, needs 4.5:1 for normal text and 3:1 for large text and UI components such as input borders and icons. AAA needs 7:1 and 4.5:1.
What counts as large text?
At least 24 CSS pixels (18pt) regular, or 18.66 pixels (14pt) bold.
Is the light gray text in my design OK?
Often not. Popular grays like #999 on white reach only 2.8:1. Use about #767676 or darker on white for normal text to pass AA.