Text & code · runs locally
Color contrast checker
WCAG contrast ratio for any two colors — AA and AAA verdicts for text, graphics and UI.
How to use this tool
- 1Pick or type two colors
Native color pickers stay synced with the hex fields — or type #1f2937 and hit enter.
- 2Read the verdicts
One ratio, four gates: AA normal (4.5), AA large/UI (3.0), AAA normal (7.0), AAA large (4.5). Live preview shows body and heading text side by side.
- 3Copy the winning pair
One click copies the color + background CSS declarations for the values that passed.
This page has no server behind it. Files are read, changed and re-built by your own browser — then they disappear when you close the tab. That's the whole privacy policy, applied.
Questions people actually ask
What ratio do I actually need?
Aim for 4.5:1 for normal body text, 3:1 for large text (24px, or 18.66px bold) and 3:1 for meaningful UI components and icons. 7:1 reaches AAA. Placeholder text and disabled controls are exempt — everything else should clear AA.
Why do the pickers and hex fields both exist?
Color pickers are quick but imprecise; hex fields are exact and paste straight from your design tool. Editing either updates the other, so you never lose sync.