Color contrast ratio calculator
Checks the contrast between text and background colors against WCAG accessibility levels.
anındahesapla Editör Ekibi · Updated:
Contrast ratio: 4.4781:1 (Large text only). Gray #777777 text on a white background reaches 4.4781:1. That passes the AA level for large text but falls just short of AA for normal text.
Web designers, developers, accessibility auditors and anyone choosing brand colors use this checker.
Readable text reaches more people.
Three levels are checked at once.
Result
4.4781:1
Contrast ratio: 4.4781:1 (Large text only)
Result in all units
Step-by-step solution
ratio = (L₁+0,05)/(L₂+0,05)
What contrast ratio measures
Contrast ratio compares the brightness of two colors.
Higher ratios mean stronger contrast.
The calculator works out the relative luminance of each color, adds 0.05 to both, and divides the brighter by the darker, so (L₁ + 0.05) ÷ (L₂ + 0.05) gives 4.4781:1 for the example pair.
WCAG sets the thresholds.
AA asks for 4.5:1 on normal text.
Large text gets a lower bar.
Bigger letters stay readable at lower contrast, so AA allows 3:1 for large text, while the stricter AAA level asks for 7:1 on normal text, which is why the example passes one check and fails the others.
Light gray on white is a common failure.
Small shifts fix it.
Darkening the text a little is usually enough to cross the 4.5:1 line without changing the look of the design.
Quick rule: aim for 4.5:1 or more on body text.
Color alone should not carry meaning.
People with low vision or color blindness rely on contrast, and text placed on photos or gradients needs checking at its weakest point, since contrast can change across the image behind it.
Many countries reference WCAG in accessibility rules for public websites.
Buttons, links and form labels all need the same check.
Dark mode designs need the same checks with the roles reversed, since light text on dark backgrounds can fail too when the gray is not bright enough.
Design systems often store approved color pairs that already pass, which saves checking every new screen.
Browser developer tools often show the contrast ratio of selected text, which makes quick checks easy while building a page.
How to use it
Enter two HEX colors and read the ratio and pass/fail results.
- Enter the text color.
- Enter the background color.
- Read the ratio and the AA and AAA results.
| Input or result | Value |
|---|---|
| Foreground (text) color | #777777 |
| Background color | #FFFFFF |
| AA, large text (≥3) | Pass |
| AA, normal text (≥4.5) | Fail |
| AAA, normal text (≥7) | Fail |
| Contrast ratio | 4.4781:1 |
Order of colors does not change the ratio.
If a color pair fails narrowly, try darkening the text in small steps and re-checking, since the example #777777 sits just below the normal-text threshold and a slightly darker gray brings it over the line while keeping a similar look.