What is a good color contrast ratio?
Contrast ratio compares the brightness of two colors on a scale from 1:1 (the same color) to 21:1 (black on white). The Web Content Accessibility Guidelines (WCAG) set the minimums most websites, apps and public-sector sites are expected to meet:
| What you check | Level AA | Level AAA |
|---|---|---|
| Normal text (body, labels, links) | 4.5:1 | 7:1 |
| Large text (24px+, or 18.66px+ bold) | 3:1 | 4.5:1 |
| Icons, input borders, focus rings, charts | 3:1 | - |
Level AA is the usual target, and it is the level referenced by most accessibility laws and procurement rules. AAA is stricter and worth aiming for in long reading text. Read more in our guide to WCAG color contrast.
How the contrast ratio is calculated
Each color is converted to its relative luminance: the red, green and blue channels are linearized and weighted (0.2126 R + 0.7152 G + 0.0722 B), because our eyes are far more sensitive to green than to blue. The ratio is then (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color. That is why yellow and white look very different to us but still score a low ratio: both are very bright.
How to fix low contrast
- Change lightness, keep the hue. The suggestions above do exactly this, so your brand color stays recognizable.
- Darken the text, not the background when the background is a large brand area.
- Use a darker shade for text and the bright one for fills. For example, a 600 or 700 shade for links and the 400 or 500 shade for buttons and badges.
- Don't rely on color alone. Add underlines, icons or labels so the meaning survives for color-blind users.
Frequently asked questions
What contrast ratio do I need for WCAG AA?
4.5:1 for normal text and 3:1 for large text (at least 24px, or 18.66px bold). Icons, form borders and other essential interface parts also need 3:1 against their surroundings.
Does white text on a blue or green button pass?
Often not. Bright mid-tones like #3D7BFF or #22C55E look strong but are light in luminance, so white text on them usually lands between 2:1 and 4:1. Pick one of the suggested darker shades, or use dark text instead.
Is the contrast ratio rounded?
No. WCAG thresholds are strict, so 4.49:1 fails AA even though it looks like 4.5. This checker compares the exact value and shows two decimals.
What about WCAG 3 and APCA?
APCA is a newer contrast method proposed for WCAG 3, which is still a draft. Legal requirements today refer to WCAG 2.x, which this tool uses.
Can I check the colors of an image or palette?
Yes. Get the codes with the Image Color Picker, or upload a picture to Palette from Image, which lists every readable pair automatically.