Skip to content
colors

deltaE76

The `deltaE76` function computes the perceptual difference between two colors using the CIE76 ΔE formula. It compares the colors in the Lab color space and returns a numeric value where lower values indicate greater similarity.

1 min read158 words

Function Signature

js

deltaE76(hexA: string, hexB: string): number

Parameters

  • hexA (string): First HEX color string.
  • hexB (string): Second HEX color string.

Return Value

Returns a number representing the perceptual distance (ΔE) between the two colors. Smaller values mean the colors are closer perceptually.

js

deltaE76("#ff6600", "#ff6600");
// 0 (identical colors)

deltaE76("#ff6600", "#ff6622");
// ~2.5 (barely noticeable)

deltaE76("#ff6600", "#00aaff");
// ~60 (very different)

Examples

js

// Compare similar oranges
console.log(deltaE76("#ff6600", "#ff6633"));
// ~3 (noticeable but small difference)

// Compare orange and blue
console.log(deltaE76("#ff6600", "#0000ff"));
// ~70 (drastic difference)

Implementation Details

  • Converts each HEX color to RGB using hexToRgb.
  • Transforms RGB to Lab with rgbToLab.
  • Computes ΔE as the Euclidean distance between the Lab coordinates:
  • ΔE = sqrt((ΔL)^2 + (Δa)^2 + (Δb)^2).
  • This is the simplest form of color difference (CIE76).

Usage Notes

  • ΔE < 1: Difference is imperceptible to the human eye.
  • ΔE < 2: Only perceptible under close observation.
  • ΔE ~ 2–10: Perceptible at a glance.
  • ΔE > 10: Colors are clearly different.
  • ΔE > 50: Colors appear opposite or unrelated.

Previous

getContrastColor

Next

deltaE2000


Top tools

BoardlyLinksyChromoCodeHub

ReadyTools

CareersContactTools
Pricing7 days free
GuidesDocsBlogUpdatesLaraVault

Select Language

Set theme

© 2026 ReadyTools. All rights reserved.