Link Text Contrast Checker
A link inside a paragraph must pass two tests, not one: 4.5:1 against the background (WCAG 1.4.3, so it is readable) and 3:1 against the surrounding body text — or carry an underline or other non-color cue (WCAG 1.4.1, technique G183, so a color-blind reader can tell it is a link at all). Enter your three colors and see both.
The three ratios
Overall verdict
Live preview
This is a paragraph of body text with a link inside it. Can you tell where the link is without hovering? Toggle the underline checkbox above and watch the difference.
The preview shows the link exactly as your colors render it. If you cannot spot the link at a glance with the underline off, a color-blind reader cannot either — that is what the 3:1 check measures.
The two rules, and why they fight each other
WCAG 1.4.3 (Contrast Minimum) asks the link to be readable: 4.5:1 against its background for normal text. WCAG 1.4.1 (Use of Color) asks the link to be findable: it must not be identified by color alone, so either the link differs from the surrounding body text by 3:1, or it carries a non-color cue — an underline, bold weight, an icon, a border (technique G183). The two rules pull in opposite directions: a light link stands out from dark body text but fades into a white background; a dark link is readable on white but sits too close to dark body text to be noticed. Most real link colors fail one of the two. That is not a bug in the test — it is why browsers underline links by default, and why removing the underline is a WCAG decision, not a styling one.
Common link colors on white — the second column is the surprise
Every color below passes the familiar 4.5:1 background test except blue-400. But measured against black body text, the web's two most historic link colors fail the 3:1 test outright.
| Link color | vs white background | vs black body text | Overall (no underline) |
|---|---|---|---|
| #0000EE (classic blue) | 9.40:1 — AAA | 2.23:1 | Fail |
| #551A8B (visited purple) | 11.01:1 — AAA | 1.91:1 | Fail |
| #2563EB (blue-600) | 5.17:1 — AA | 4.06:1 | Pass |
| #1D4ED8 (blue-700) | 6.70:1 — AA | 3.13:1 | Pass |
| #0066CC | 5.57:1 — AA | 3.77:1 | Pass |
| #60A5FA (blue-400) | 2.54:1 | 8.26:1 | Fail |
| #1A7F37 (green) | 5.08:1 — AA | 4.13:1 | Pass |
| #B42318 (red) | 6.57:1 — AA | 3.19:1 | Pass |
Note the pattern: the colors that pass both do so against pure black body text. Real body text is rarely pure black — and that is where the next table bites.
The body-text trap: darkening the body is not the fix you think
Take the same link, blue-600 #2563EB, and vary only the body text. Against near-black body it passes; against the gray-800 body most sites actually use, it fails. And the intuitive fix — lightening the body text so the link "pops" — makes it worse, because the link and the body converge in luminance.
| Pair | Link vs body | Body vs white | Verdict (no underline) |
|---|---|---|---|
| #2563EB link vs #000000 body | 4.06:1 | 21.00:1 | Pass |
| #2563EB link vs #111827 body | 3.43:1 | 17.74:1 | Pass |
| #2563EB link vs #1F2937 body | 2.84:1 | 14.68:1 | Fail |
| #2563EB link vs #374151 body | 1.99:1 | 10.31:1 | Fail |
| #0000EE link vs #000000 body | 2.23:1 | 21.00:1 | Fail — can never pass; underline required |
| #551A8B link vs #000000 body | 1.91:1 | 21.00:1 | Fail — can never pass; underline required |
| #60A5FA link vs #111827 body | 6.98:1 | 17.74:1 | Fail — passes 3:1, fails 4.5:1 vs white (2.54:1) |
The last row is the tension in one line: the light blue that easily clears the 3:1 body test fails the 4.5:1 background test. You cannot fix both by sliding the link's lightness in either direction — one test improves exactly as the other worsens. The two honest exits are: darken the body text to #111827 or black (the #2563EB rows show the boundary is between #111827 and #1F2937), or underline the link and stop fighting the trade-off.
Dark mode has the same tension, mirrored
On a #121212 background with #E5E7EB body text, every common light link color passes 4.5:1 against the background and fails 3:1 against the body text. Dark-mode links need underlines too.
| Link color | vs #121212 background | vs #E5E7EB body | Overall (no underline) |
|---|---|---|---|
| #93C5FD (blue-300) | 10.39:1 — AAA | 1.46:1 | Fail |
| #60A5FA (blue-400) | 7.37:1 — AAA | 2.05:1 | Fail |
| #38BDF8 (sky-400) | 8.74:1 — AAA | 1.73:1 | Fail |
| #F472B6 (pink-400) | 7.07:1 — AAA | 2.14:1 | Fail |
| #34D399 (emerald-400) | 9.74:1 — AAA | 1.55:1 | Fail |
| #FBBF24 (amber-400) | 11.22:1 — AAA | 1.35:1 | Fail |
| #A78BFA (violet-400) | 6.88:1 — AA | 2.20:1 | Fail |
| #3B82F6 (blue-500) | 5.09:1 — AA | 2.97:1 | Fail — just 0.03 short |
| #2563EB (blue-600) | 3.62:1 | 4.17:1 | Fail — the inverse: passes 3:1, fails 4.5:1 vs background |
Blue-500 #3B82F6 at 2.97:1 is the closest near-miss in this guide — three hundredths from passing. Do not round it up: the 3:1 line is inclusive at exactly 3.00, and 2.97 is a fail. The same table also shows the mirror image of the light-mode trap: blue-600 #2563EB passes the body test on dark (4.17:1) but fails the background test (3.62:1).
How to fix a failing link
- Underline it. The cheapest, most robust fix — and the one browsers ship by default. An underline (or bold, icon, or border) satisfies WCAG 1.4.1 with no color requirement at all. If your design system removed underlines for looks, this tool is showing you what that cost.
- Darken the body text. With a blue-600 link, moving body text from #1F2937 to #111827 (2.84 → 3.43) crosses the line. Do not lighten the body text — that direction makes the link-vs-body ratio smaller.
- Check the visited state too. Visited purple #551A8B fails against black body text (1.91:1) even when your unvisited blue passes. Run the check with the visited color as well.
- Do not trust "it looks blue enough". #0000EE looks unmistakably like a link to a sighted reader — and measures 2.23:1 against black text. The number is the test, and the test exists for readers who cannot see the blue.
How the math works
All three ratios use the same WCAG 2.1 formula as the main contrast checker: relative luminance from linearized sRGB (weights 0.2126 red, 0.7152 green, 0.0722 blue), then (L1 + 0.05) / (L2 + 0.05). Thresholds are inclusive: exactly 4.50:1 passes AA, exactly 3.00:1 passes the G183 body-text test. The overall verdict requires link-vs-background ≥ 4.5:1 and (link-vs-body ≥ 3:1 or an underline). No uploads, no tracking: it all runs in your browser.
FAQ
Isn't 4.5:1 enough for a link?
No. 4.5:1 is only the link-versus-background test (WCAG 1.4.3). WCAG 1.4.1 separately requires the link to be distinguishable from the surrounding body text — a 3:1 color difference, or a non-color cue such as an underline. A link can pass 4.5:1 and still be invisible as a link to a color-blind reader.
Does an underline really fix a failing link?
Yes. Technique G183 lists underlining (and other non-color cues such as bold, an icon, or a border) as a valid way to distinguish links from surrounding text, with no color-difference requirement at all. That is exactly why browsers underline links by default — and why removing the underline creates a WCAG problem most teams never measure.
Why does the classic blue link fail the test?
The web's original link blue, #0000EE, measures 9.40:1 against white — AAA — but only 2.23:1 against black body text, below the 3:1 line. Even against pure black it cannot pass, so a classic blue link with no underline fails WCAG 1.4.1. The visited-link purple #551A8B is worse at 1.91:1 against black. Both need underlines (or a different link color).
Can I pass both rules with color alone?
Sometimes, but the window is narrow. The link's luminance must sit in a band: dark enough for 4.5:1 against the background, light enough for 3:1 against the body text. For example, blue-600 #2563EB passes both when the body text is #111827 or darker (3.43:1), but fails when the body is #1F2937 (2.84:1). Darkening the link helps the background test and hurts the body test; lightening the body text makes the body test worse, not better.
Do dark-mode links have the same problem?
Yes, mirrored. On a #121212 background with #E5E7EB body text, every common light link color fails the 3:1 link-vs-body test — #93C5FD is 1.46:1, #60A5FA 2.05:1, #FBBF24 1.35:1 — even though all of them pass 4.5:1 against the background. Dark-mode links need underlines too, or a much darker body text.
Is my color data uploaded anywhere?
No. Everything runs locally in your browser; no colors, no analytics, no tracking.