What is color contrast?
Contrast is how different the lightness of text is from its background. Low contrast text is hard to read, especially for people with weak vision, on a dim screen or in bright sunlight. The WCAG accessibility guidelines turn this into a number called the contrast ratio, from 1:1 (no difference) to 21:1 (black on white).
Level AA needs at least 4.5:1 for normal text and 3:1 for large text and interface parts such as icons and input borders. Level AAA needs 7:1 for normal text and 4.5:1 for large text. This tool measures your pair, shows each pass or fail and, if the pair fails AA, suggests the nearest text color that passes.
How to use the WCAG Contrast Checker
- Enter the text color and the background color.
- Read the ratio and the pass or fail rows.
- If it fails AA, look at the suggested replacement color.
- Use the Swap option to test the reverse pairing.