Blog · Color Science

Color Difference Formulas

Complete guide to the three major Delta E formulas — CIE76, CIE94 and CIEDE2000 — plus the modern OKLab alternative.

Published November 15, 2026 · 8 min read

What Is Color Difference?

Color difference (Delta E, or ΔE) measures how distinguishable two colors are to the human eye. It is essential for quality control in manufacturing, brand color fidelity verification, image comparison and design review.

Multiple Delta E formulas have been proposed over the past 50 years. Each attempts to more accurately match human perception, but all are approximations of a complex biological process.

Delta E CIE76

The original formula, introduced in 1976 with the CIELAB color space itself. It is a simple Euclidean distance in Lab space:

ΔE = sqrt((L1 - L2)² + (a1 - a2)² + (b1 - b2)²)

Pros: Simple, fast, mathematically clean.

Cons: Does not account for the eye's non-uniform response — CIELAB has poor uniformity in the blue-purple region, so CIE76 overestimates differences in the blue-purple area and underestimates in some other regions.

When to use: Quick comparisons where exact perceptual accuracy is not critical. Legacy systems that still use CIELAB Dela E 76.

Delta E CIE94

An update from 1994 that adds weighting functions for lightness, chroma and hue. The weighting varies based on application (textile vs graphic arts).

ΔE = sqrt(
  (ΔL / kL·SL)² +
  (ΔC / kC·SC)² +
  (ΔH / kH·SH)²
)

Where:
  ΔL = L1 - L2
  ΔC = C1 - C2 (chroma difference)
  ΔH = sqrt(Δa² + Δb² - ΔC²) (hue difference)
  kL, kC, kH = application-specific weights
  SL, SC, SH = semi-axis scaling

Pros: Better than CIE76 for saturated colors.

Cons: Still imprecise in the blue-purple region. Requires application-specific constants.

When to use: Textile industry, paint industry, applications where the specific weighting constants are already established.

Delta E CIEDE2000

The current standard for color difference measurement. Introduced in 2000, it improves on CIE94 with:

  • Improved blue-purple handling: the main weakness of earlier formulas
  • Rotation term: accounts for the hue non-linearity in the blue region
  • Better chroma weighting: more accurate at low and high chroma

The full CIEDE2000 formula is complex — over 30 lines of math — but implementing it correctly is essential for accurate color matching. Here is the JavaScript implementation:

function ciede2000(lab1, lab2) {
  const { L: L1, a: a1, b: b1 } = lab1;
  const { L: L2, a: a2, b: b2 } = lab2;

  const kL = 1, kC = 1, kH = 1;

  const C1 = Math.sqrt(a1*a1 + b1*b1);
  const C2 = Math.sqrt(a2*a2 + b2*b2);
  const Cbar = (C1 + C2) / 2;

  const G = 0.5 * (1 - Math.sqrt(Math.pow(Cbar, 7) / (Math.pow(Cbar, 7) + Math.pow(25, 7))));
  const a1p = (1 + G) * a1;
  const a2p = (1 + G) * a2;
  const C1p = Math.sqrt(a1p*a1p + b1*b1);
  const C2p = Math.sqrt(a2p*a2p + b2*b2);

  const h1p = (b1 === 0 && a1p === 0) ? 0 : (Math.atan2(b1, a1p) * 180 / Math.PI + 360) % 360;
  const h2p = (b2 === 0 && a2p === 0) ? 0 : (Math.atan2(b2, a2p) * 180 / Math.PI + 360) % 360;

  const dLp = L2 - L1;
  const dCp = C2p - C1p;

  let dhp;
  if (C1p * C2p === 0) dhp = 0;
  else if (Math.abs(h2p - h1p) <= 180) dhp = h2p - h1p;
  else if (h2p - h1p > 180) dhp = h2p - h1p - 360;
  else dhp = h2p - h1p + 360;

  const dHp = 2 * Math.sqrt(C1p * C2p) * Math.sin(dhp * Math.PI / 360);

  const Lbarp = (L1 + L2) / 2;
  const Cbarp = (C1p + C2p) / 2;

  let hbarp;
  if (C1p * C2p === 0) hbarp = h1p + h2p;
  else if (Math.abs(h1p - h2p) <= 180) hbarp = (h1p + h2p) / 2;
  else if (h1p + h2p < 360) hbarp = (h1p + h2p + 360) / 2;
  else hbarp = (h1p + h2p - 360) / 2;

  const T = 1 - 0.17 * Math.cos((hbarp - 30) * Math.PI / 180)
             + 0.24 * Math.cos((2 * hbarp) * Math.PI / 180)
             + 0.32 * Math.cos((3 * hbarp + 6) * Math.PI / 180)
             - 0.20 * Math.cos((4 * hbarp - 63) * Math.PI / 180);

  const SL = 1 + (0.015 * Math.pow(Lbarp - 50, 2)) / Math.sqrt(20 + Math.pow(Lbarp - 50, 2));
  const SC = 1 + 0.045 * Cbarp;
  const SH = 1 + 0.015 * Cbarp * T;

  const RT = -2 * Math.sqrt(Math.pow(Cbarp, 7) / (Math.pow(Cbarp, 7) + Math.pow(25, 7)))
             * Math.sin(60 * Math.exp(-Math.pow((hbarp - 275) / 25, 2)) * Math.PI / 180);

  return Math.sqrt(
    Math.pow(dLp / (kL * SL), 2) +
    Math.pow(dCp / (kC * SC), 2) +
    Math.pow(dHp / (kH * SH), 2) +
    RT * (dCp / (kC * SC)) * (dHp / (kH * SH))
  );
}

Pros: The most accurate formula available. Matches human perception closely, especially for blue-purple colors.

Cons: Complex to implement correctly. Overkill for quick comparisons.

When to use: Brand color matching, quality control, any application where perceptual accuracy matters.

OKLab-Based Color Difference

A newer approach uses OKLab instead of CIELAB. The formula is the same Euclidean distance:

ΔE_ok = sqrt((L1 - L2)² + (a1 - a2)² + (b1 - b2)²)

Because OKLab is more uniform than CIELAB, this simple formula produces results comparable to CIEDE2000 for many applications — with much simpler math.

Pros: Very simple formula. Good perceptual accuracy. Directly usable in modern CSS with oklab().

Cons: Not yet adopted as an ISO/CIE standard. Some legacy systems expect CIELAB values.

When to use: Modern design tools, web-based color matching, gradient interpolation.

Which Formula Should You Use?

  • Quick visual comparison: CIE76 (simple, good enough for most)
  • Brand color matching: CIEDE2000
  • Manufacturing quality control: CIEDE2000 (industry standard)
  • Modern web tools: OKLab
  • Printing/paint/textiles: CIE94 or CIEDE2000 (application-specific)

Interpreting Delta E

Regardless of the formula used, the interpretation is similar:

  • < 1: Imperceptible — the human eye cannot distinguish
  • 1-2: Only noticeable side by side
  • 2-10: Perceptible at a glance
  • 10-20: Clearly different colors
  • 20-50: Substantially different
  • > 50: Very different hues

Choosing the Right Threshold

  • < 1: High-end brand matching (luxury goods, cosmetics)
  • < 2: Standard brand matching (most commercial work)
  • < 3: Acceptable variance in manufacturing
  • < 5: Tolerable for non-critical applications
  • > 5: Noticeable to end users — unacceptable for brand work

Frequently Asked Questions

Related Resources