Why Contrast Ratios Exist
How the eye and the math behind 4.5 to 1 connect.
Why Contrast Ratios Exist is a free Web Accessibility Academy lesson on CoddyKit — lesson 1 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Web Accessibility Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
What Contrast Really Means
When you read text, your eye is comparing how light or dark the letters are against the background. That gap is contrast. 👀
Why We Need a Number
One designer says a color looks fine, another squints. To settle it, accessibility uses a contrast ratio, a single measurable number anyone can check.
The Ratio Scale
The ratio runs from 1:1 to 21:1. Black on white is the maximum, 21:1, while the same color on itself is 1:1 and totally invisible.
Luminance, Not Just Color
The math is built on luminance, the perceived brightness of a color. Two very different hues can still clash if their brightness is too close.
Eyes Are Not All Equal
Contrast rules exist because vision varies. Low-vision users, older eyes, and tired readers all need a bigger gap than a young designer on a bright screen.
The Real World Fights You
Sunlight glare, cheap monitors, and dimmed phones all eat into contrast. A ratio that survives those conditions keeps text readable everywhere.
Where 4.5 to 1 Comes From
WCAG picked 4.5:1 for normal text as a research-backed floor. It roughly accounts for moderate low vision without forcing pure black and white.
Bigger Text, Smaller Demand
Large text is easier to read, so the bar drops to 3:1. Thick, big letters tolerate a smaller brightness gap than tiny body copy does.
Foreground and Background Pair
A ratio is always about two colors together. A gray is never readable or unreadable alone, only against the surface it sits on.
It Is Not Just Text
The same idea extends to UI components. Button borders, icons, and form outlines also need enough contrast so users can find them.
A Ratio in Real CSS
These two colors form roughly a 4.6:1 ratio, just clearing the normal-text bar for comfortable reading.
p {
color: #595959;
background: #ffffff;
}Quick Check
Let us test why the ratio exists at all.
Recap: Why Ratios Exist
You learned that a contrast ratio turns readability into one honest number, built on luminance, so text works for every eye. Next: hitting the AA thresholds. ✅
Frequently asked questions
Is the “Why Contrast Ratios Exist” lesson free?
Yes — the full text of “Why Contrast Ratios Exist” is free to read here on the web, and the Web Accessibility Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Web Accessibility Academy course, upgrade to CoddyKit PRO.
What will I learn in “Why Contrast Ratios Exist”?
How the eye and the math behind 4.5 to 1 connect. You practise Web Accessibility Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Web Accessibility Academy?
No prior experience is required. Web Accessibility Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 1 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Why Contrast Ratios Exist” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Web Accessibility Academy lesson?
Yes. Every Web Accessibility Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- Why Contrast Ratios Exist
- Hitting AA: Text and Large Text Thresholds
- Never Rely on Color Alone
- Checking Contrast With Free Tools