Contrast Checker
Check the contrast ratio between a text color and a background color, with WCAG AA and AAA badges, ready-made pairings, a live button and text preview, and a palette generator.
Compare a text colour with its background. Get the WCAG ratio, AA and AAA results, a live preview and a fix when it fails.
Small print, 12 px, the hardest to read.
Approximate simulations. They show how your pair may look with common colour vision differences.
Common pairings with their live ratio. Tap one to load it.
Ratios use the WCAG 2.x formula on solid colours. Your pairs and history stay in this browser only.
Found a Bug or Missing a Feature?
Report any problems or suggest new features you want. You can write in English, Urdu, Hindi, or any language! Our AI will analyze your feedback and upgrade the tool.
About This Tool
Check the contrast ratio between a text color and a background color, with WCAG AA and AAA badges, ready-made pairings, a live button and text preview, and a palette generator.
Most contrast failures do not come from bad taste. They come from a grey that looked elegant on a designer's bright monitor and turned into mush on a phone in sunlight. This contrast checker takes two colours and tells you plainly whether people can read the result, with the WCAG 2 ratio, pass or fail badges for AA and AAA, and a live sample so you see the effect and not just the number.
Five pairs that look fine and still fail
Numbers make this concrete. Here are pairs the tool scores, all on a white or near-white background unless noted:
- Light grey #9CA3AF on white: 2.54 : 1. A popular placeholder grey, and it fails everything.
- White on orange #F97316: 2.80 : 1. Fine for a large icon at best, not for button text.
- Yellow #FACC15 on white: 1.53 : 1. Almost invisible.
- White on green #16A34A: 3.30 : 1. Passes for large text, fails for normal text.
- #777777 on white: 4.48 : 1. Misses AA by a whisker, while #767676 clears it at 4.54 : 1.
For contrast, dark brown #1C0A00 on the same orange scores 6.86 : 1, which is why a dark label on a bright button often works better than white.
How to use it
- Enter a text colour and a background colour, either by typing a code or with the colour pickers. HEX with 3 or 6 digits and rgb() both work.
- Read the big ratio and the verdict: Excellent, Good, Large text only, or Fails.
- Check the five result tiles: AA normal, AA large, AAA normal, AAA large and UI parts.
- If the pair fails, open Fix it. Choose a target, and the tool searches for the closest darker or lighter shade that keeps your hue and still reaches it.
What is in the tabs
Live preview
A heading, a paragraph, small print, a button, an input outline and a link, all drawn in your two colours. Change the sample sentence to your own copy.
Vision
Four approximate colour-vision views and normal vision, each with its own ratio. A pair can pass for everyone but one group, and this is where you notice.
Palette
Ten lightness steps of your text hue on your background, and ten of your background hue behind your text, each with its ratio. Tap a step to adopt it.
Pairings, Saved and history
Twelve common combinations to start from. Pairs you save stay in your browser and can be exported as JSON. A short history of your last checks sits under the Saved tab.
Where the rules come from
WCAG 2 defines contrast as a ratio between the relative luminance of two colours, running from 1 : 1 (identical) to 21 : 1 (black on white). The thresholds used here are 4.5 : 1 and 7 : 1 for normal text, 3 : 1 and 4.5 : 1 for large text, and 3 : 1 for meaningful UI parts. If you need an exact RGB value for a brand colour first, use the HEX to RGB converter and bring the result back here.
A fair warning: the check works on solid colours. Text over a photo or a gradient needs testing at its worst spot, and translucent colours should be flattened against the real background before you test them.
Questions people ask
What contrast ratio do I need for WCAG AA?
4.5 : 1 for normal text, 3 : 1 for large text and UI components.
What is the difference between AA and AAA?
AAA asks for 7 : 1 on normal text and 4.5 : 1 on large text. AA is the common legal and policy target.
Why does #777777 on white fail?
It is 4.48 : 1, just below 4.5 : 1. The tool shows it as short instead of rounding it up.
Does it help with colour blindness?
The Vision tab gives approximate views for common types and a ratio for each one.
What is the APCA figure?
An experimental method shown for reference. WCAG 2 remains the standard most audits use.
