Chart Color Contrast Checker

A chart fails in two ways: a series color can vanish against the background, or two series can look identical to each other. This tool checks both. Enter your chart background and up to 6 series colors: each series is scored against the background at the WCAG 3:1 non-text bar, and every pair of series is scored with CIE76 Delta E so look-alike lines get caught before they ship.

Summary

–
Series passing 3:1 vs background
–
Series failing 3:1
–
Closest pair (smallest ΔE)
–
Most different pair (largest ΔE)

Failing 3:1: –

Each series vs background (WCAG 3:1)

Series vs series (CIE76 ΔE)

ΔE below 10: too close — hard to tell apart. 10–20: may be hard to tell at a glance. 20 and above: distinguishable. These bands are a heuristic, not a WCAG rule — see the guide below.

Bar preview

Each segment is one series in your colors, on your background. If two segments blur together here, they will blur together in your chart.

What the example palette shows

The default palette is a classic categorical set (blue, orange, green, red, purple, pink) on white. Four of the six series clear the 3:1 bar — but two do not, and the Delta E matrix tells a different story than the contrast table:

SeriesColorRatio vs whiteVerdict at 3:1
Blue#1F77B44.82:1Pass
Orange#FF7F0E2.53:1Fail
Green#2CA02C3.40:1Pass
Red#D627285.02:1Pass
Purple#9467BD4.26:1Pass
Pink#E377C22.73:1Fail

On the Delta E side, the closest pair is purple vs pink at 27.70 and the most different pair is green vs pink at 126.17 — all 15 pairs score 20 or above, so every series is distinguishable from every other. The palette's problem is not series-vs-series confusion; it is two light series (orange, pink) fading into a white background. Fix those two and the set is solid.

When two series look the same

Same-hue shades are the usual trap: two blues from one ramp, or two greens a step apart, can each pass 3:1 against the background while being nearly identical to each other. The numbers below are the actual Delta E values — the bands are a screening heuristic, not a WCAG threshold:

PairΔEBandWhat it means
#1F77B4 vs #2E86C16.14Too closeTwo near-identical blues — readers will mix the series up.
#2563EB vs #1D4ED89.16Too closeAdjacent shades of one blue ramp; do not use both as series.
#2CA02C vs #22C55E16.77May be hard to tellTwo greens a step apart — risky in thin lines or small slices.
#2563EB vs #3B82F618.97May be hard to tellStill under 20 — fine for thick bars, shaky for 1 px lines.
#FF7F0E vs #F59E0B20.90DistinguishableJust over the line — orange vs amber clears it, barely.

Dark backgrounds flip the verdicts

Contrast is always relative. The two series that fail on white pass easily on dark — and the strongest series on white are the weakest on dark. Same six colors, background #111827:

Seriesvs whitevs #111827Verdict on dark
Blue #1F77B44.82:13.68:1Pass
Orange #FF7F0E2.53:17.01:1Pass
Green #2CA02C3.40:15.21:1Pass
Red #D627285.02:13.53:1Pass
Purple #9467BD4.26:14.17:1Pass
Pink #E377C22.73:16.49:1Pass

All six pass on dark — but notice the margin: blue (3.68) and red (3.53) are the closest to the line there, the opposite of white. If your chart ships in both themes, check both backgrounds; a palette that passes in one theme can fail in the other. The dark mode guide covers the same flip for text.

How to fix a failing series

  1. Darken it on light backgrounds (or lighten it on dark ones). Orange #FF7F0E at 2.53:1 on white needs a darker shade; the same hue one step down usually clears 3:1 without changing the palette's character.
  2. Do not rely on color alone. WCAG 1.4.1 Use of Color: add direct labels, different line styles (solid / dashed / dotted), or markers, so the series are identifiable even where color fails.
  3. Drop a duplicate, don't recolor it slightly. Two blues at ΔE 9.16 are not two series — pick one, and take the second color from a different hue family.
  4. Check the real background. A series that passes on white can fail on a tinted card or a gradient — run the check with the chart's actual background, not an assumed white.

How the math works

Two separate calculations. Contrast vs background is the standard WCAG 2.1 ratio: relative luminance from linearized sRGB (weights 0.2126 red, 0.7152 green, 0.0722 blue), then (L1 + 0.05) / (L2 + 0.05), checked against the 3:1 non-text bar from Success Criterion 1.4.11 — the threshold is inclusive, exactly 3.00:1 passes. The gray boundary shows how tight that is: #949494 on white is 3.03:1 (pass) while #959595 is 2.995:1 (fail — it rounds to 3.00 on screen but still fails, because the rule is on the exact ratio). Series vs series is CIE76 Delta E: sRGB → linear RGB → XYZ (D65) → CIELAB, then the Euclidean distance between the two L*a*b* points. As a sanity check, the implementation reproduces the textbook Lab values for pure red (L* 53.24, a* 80.09, b* 67.20) and the primary-pair distances — red vs green 170.58, red vs blue 176.33, green vs blue 258.69. CIE76 is the simplest Delta E formula; CIEDE2000 is more perceptually uniform, but for a screening tool the plain Euclidean distance in Lab space is the standard, transparent choice. No uploads, no tracking: it all runs in your browser. For text labels on the chart, use the contrast checker (4.5:1); to test the palette for color blindness, use the color blindness simulator.

FAQ

Is 3:1 a WCAG rule for chart colors?

Yes — for the chart itself. WCAG 2.1 Success Criterion 1.4.11 Non-text Contrast requires meaningful graphical objects, including chart lines, bars, and pie slices, to reach 3:1 against adjacent colors (here, the background). Text labels on the chart are a different rule: 4.5:1 for normal text under 1.4.3, covered by the contrast checker.

What is Delta E (CIE76), and why use it between series colors?

Delta E is the distance between two colors in CIELAB space, a color space designed so equal distances feel roughly equally different. CIE76 is the simplest form: the straight-line (Euclidean) distance between the two colors' L*, a*, b* values. Contrast ratio only compares each series against the background — two series can both pass 3:1 against white and still be nearly identical to each other. Delta E catches that: it is the pair-vs-pair check.

Are the Delta E bands (10 / 20) a WCAG standard?

No. WCAG sets no Delta E threshold — the 10 and 20 bands on this page are a heuristic, a rule of thumb for screening. Below 10, two colors are close enough that many people will struggle to tell them apart; 10–20 is a gray zone where they may be hard to distinguish at a glance or in thin lines; 20 and above is usually safe. Treat a borderline score as a reason to test with real users, not as a pass/fail verdict.

If two series have a high Delta E, are they safe for color-blind users?

Not necessarily. Delta E measures difference for typical color vision; color blindness collapses one hue dimension, so a red and a green with a large Delta E can still look identical to a deuteranope. A high Delta E is necessary but not sufficient — run the palette through the color blindness simulator, and never rely on color alone: add direct labels, different line styles, or markers (WCAG 1.4.1 Use of Color).

Why do orange and pink fail on white but pass on a dark background?

Contrast is always relative to the background. Orange #FF7F0E scores 2.53:1 on white (fail) but 7.01:1 on dark #111827 (pass); pink #E377C2 goes from 2.73:1 to 6.49:1. A series color is never "accessible" or "inaccessible" on its own — it is only accessible on a given background, which is why this tool checks the pair you actually ship.

Is my color data uploaded anywhere?

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