Non-Text Contrast Checker

Text needs 4.5:1 — but icons, input borders, focus rings, and chart lines only need 3:1 (WCAG 2.1 Success Criterion 1.4.11, against adjacent colors). Enter your component color and the color right next to it, and see whether the boundary is actually visible.

Result — WCAG 1.4.11 (3:1)

–
Contrast ratio
–
Verdict at 3:1
–
Distance from the 3:1 line

What this pair passes (or fails) at 3:1

UseNeedsAdjacent color to measureVerdict
Meaningful icon / graphic3:1The surface behind the icon–
Input & button borders3:1The page / card behind the control–
Focus indicator3:1Both the control and the page — check twice–
Chart lines & diagram parts3:1The chart background–

Live preview

Icon ✓
Input border
Button border
Focus ring (vs this background)

The focus ring above is checked against the background shown here. A real focus ring has a second neighbor — the control itself — so run the check again with the control's fill as the adjacent color.

What 3:1 actually covers

WCAG 2.1 Success Criterion 1.4.11 (Non-text Contrast) requires a 3:1 ratio between a UI component or meaningful graphic and its adjacent colors. That covers four things: the visible boundary of controls (input borders, button outlines), meaningful icons and graphics (a chart line, a status icon, a diagram part), the state of a control (a checked checkbox, a selected tab), and the focus indicator. What it does not cover: text (that is 1.4.3, 4.5:1), purely decorative graphics, logos, and inactive or disabled components — those are explicitly exempt.

Real component colors, real verdicts — on white

The 3:1 line is more forgiving than the 4.5:1 text line, and the grays that barely pass as text sail through here. But the light grays designers reach for by default fail even at 3:1 — the classic Tailwind gray-300 border is 1.47:1, effectively invisible.

Component colorRatio on #FFFFFFVerdictWhat it means
#6B7280 (gray-500)4.83:1PassA safe default icon / border gray.
#7676764.54:1PassBarely passes as text (4.5:1) — comfortably passes here.
#64748B (slate-500)4.76:1PassAnother safe mid-gray.
#78716C (stone-500)4.80:1PassWarm gray, same story.
#2563EB (blue-600)5.17:1PassGood focus-ring blue on white.
#1D4ED8 (blue-700)6.70:1PassDarker blue, even safer.
#9CA3AF (gray-400)2.54:1FailThe most common failing gray — looks fine, measures short.
#94A3B8 (slate-400)2.56:1FailSame trap in the slate family.
#A8A29E (stone-400)2.52:1FailSame trap in the stone family.
#60A5FA (blue-400)2.54:1FailBright blue is not automatically visible on white.
#F59E0B (amber-500)2.15:1FailWarning amber needs a darker shade on white.
#D1D5DB (gray-300)1.47:1FailThe default light border — nearly invisible.
#CBD5E1 (slate-300)1.48:1FailSame for slate-300.
#E5E7EB (gray-200)1.24:1FailOnly usable as a divider on a darker card, never on white.

Same colors, dark backgrounds

Contrast is always relative. The grays that fail on white can pass on dark — and the ones that pass on white can fail there.

PairRatioVerdictWhat it means
#9CA3AF on #1212127.38:1PassThe failing gray-400 becomes a passing dark-mode icon.
#6B7280 on #1212123.88:1PassPasses — but only just. One shade darker would fail.
#52525B on #1212122.42:1FailZinc-600 on near-black: the dark-mode version of the same trap.
#60A5FA on #1212127.37:1PassBlue-400 fails on white (2.54) and passes on dark (7.37).
#38BDF8 on #1212128.74:1PassSky-400 is a strong dark-mode accent.
#94A3B8 on #0F172A6.96:1PassSlate-400 icon on a slate-900 surface: fine.
#CBD5E1 on #0F172A12.02:1PassSlate-300 on slate-900: very strong.

The focus-indicator trap: a ring has two neighbors

A focus ring must reach 3:1 against both adjacent colors — the control it surrounds and the page behind it. Checking only one side is the most common way a "passing" focus indicator ships broken. The classic failure is a blue ring on a blue button:

Focus ring vs…RatioVerdictWhat it means
#2563EB ring vs white page5.17:1PassAgainst the page, the ring is clearly visible.
#2563EB ring vs #1D4ED8 button1.30:1FailSame ring, same button family — invisible where it meets the control.
#93C5FD ring vs #2563EB button2.87:1FailA light ring on a blue button still falls short of 3:1.
#FFFFFF ring vs #2563EB button5.17:1PassA white ring on the blue button passes — pair it with a dark outer ring for the page side.
#2563EB ring vs #EFF6FF card4.75:1PassEven on a pale blue card the ring holds up.

The robust fix is a double ring: a white inner ring plus a dark outer ring (or the reverse). One of the two always contrasts with whatever sits on either side. WCAG 2.2 additionally asks the indicator to cover an area at least as large as a 2px perimeter of the component — this tool checks color only, so keep the ring thick enough as well as contrasting enough. To check both the color and the area of your ring, use the Focus Indicator Contrast Checker.

How to fix a failing component

  1. Go one shade darker (or lighter on dark). The fix is almost always a single step in your scale: gray-400 → gray-500 (2.54 → 4.83), slate-300 → slate-400 still fails (1.48 → 2.56), so for borders go two steps: slate-300 → slate-500 (1.48 → 4.76).
  2. Check the real adjacent color. A border that passes on white can fail on a tinted card — run the check with the card color, not the page color.
  3. For focus rings, use a double ring. White + dark, so the ring passes against both the control and the page no matter their colors.
  4. Do not rely on "it looks fine". #9CA3AF and #94A3B8 both look like perfectly readable grays on white; both measure 2.5:1 and fail. The number is the test.

How the math works

Same WCAG 2.1 ratio as the text checker: relative luminance from linearized sRGB (weights 0.2126 red, 0.7152 green, 0.0722 blue), then (L1 + 0.05) / (L2 + 0.05). Only the threshold changes — 3:1 instead of 4.5:1 — and the threshold is inclusive: exactly 3.00:1 passes. No uploads, no tracking: it all runs in your browser.

FAQ

Is 3:1 the rule for text too?

No. Text needs 4.5:1 for normal text and 3:1 for large text (WCAG 1.4.3). The 3:1 rule on this page is WCAG 1.4.11, which covers non-text elements only: icons, UI component borders, focus indicators, and meaningful graphics. A gray that passes here (for example #767676 at 4.54:1) still barely passes for text — check text with the contrast checker.

Do disabled controls need 3:1 contrast?

No. WCAG 1.4.11 explicitly exempts inactive user interface components — a disabled button or a grayed-out control does not need to meet 3:1. The exemption only applies while the control is genuinely disabled, not to controls that merely look subdued.

Does my logo need 3:1 contrast?

No. Logos and purely decorative graphics are exempt from 1.4.11. The rule applies to graphics that carry meaning — a chart line, a status icon, a diagram part — and to the visible boundaries of controls that users must find and operate.

What counts as the adjacent color for a border or icon?

The color directly next to the element: for an input border it is usually the page or card background behind the field; for an icon it is the fill of the button or surface it sits on. A focus indicator is special — it has two neighbors, the control and the page — and it must reach 3:1 against both.

My icon passes 3:1 but it sits inside a button — what do I check?

Both layers. Check the icon against the button's fill, and check the button's border (or the button's fill, if the button has no border) against the page background. Each boundary needs its own 3:1 — a passing icon on a button that melts into the page still fails.

Is my color data uploaded anywhere?

No. Everything runs locally in your browser; no colors, no analytics, no tracking.