Pick a text color and a background color. You see the contrast ratio, whether it passes WCAG, and a fix if it does not.
Normal text: the quick brown fox jumps over the lazy dog.
Large text (24 px)
Button0 bytes uploaded to our server
Runs entirely in your browser: 0 bytes uploaded. Your files and text never leave your device. Privacy
What the WCAG contrast rules say
The Web Content Accessibility Guidelines (WCAG 2.2) set minimum contrast between text and its background so people with low vision, color blindness or a phone in sunlight can still read it.
- AA, normal text: 4.5:1. The level most laws and policies ask for.
- AA, large text: 3:1. Large means at least 24 px, or 18.66 px (14 pt) when bold.
- AAA, normal text: 7:1 and AAA, large text: 4.5:1. The enhanced level.
- Buttons, icons and form borders: 3:1 against what is next to them (WCAG 1.4.11).
The ratio runs from 1:1 (same color) to 21:1 (black on white). It is based on the relative luminance of each color, the formula WCAG defines.
Common problems
- Light grey text on white. #999999 on white is only 2.8:1. #767676 is the lightest grey that passes AA on white.
- White text on brand colors such as bright orange, yellow or light green buttons.
- Placeholder text in forms, often far too light.
- Text over photos. Add a dark overlay or a solid band behind the text.
In WordPress with GeneratePress, adjust colors under Appearance → Customize → Colors. Change the global color once and every block that uses it follows.
FAQ
What contrast ratio do I need?
At least 4.5:1 for normal text and 3:1 for large text to meet WCAG AA, which is what most accessibility laws refer to.
What counts as large text?
24 px or larger, or 18.66 px (14 pt) or larger when bold.
Does contrast apply to logos?
No. Logos and brand names are exempt, as is text in inactive (disabled) controls and pure decoration.
Can I use transparent colors?
Yes. Enter a color with alpha, such as #0000008a or rgba(0,0,0,.54); we blend it over the background first, as the browser does.