Function deltaE76

Measures CIE 1976 Euclidean colour difference between two CIELAB D50 values.

T deltaE76(T)(
  CieLabD50!T lhs,
  CieLabD50!T rhs
) pure nothrow @nogc @safe
if (is(T == float) || is(T == double));

This is the Delta E 1976 metric. It operates directly on CIELAB coordinates; it performs no conversion, clipping, gamut mapping, alpha resolution, or perceptual-threshold classification.

Parameters

NameDescription
lhs First CIELAB D50 value.
rhs Second CIELAB D50 value.

Returns

The Euclidean distance in CIELAB coordinates. NaN input propagates as NaN. An infinite component difference produces positive infinity.

Standards

ISO/CIE 11664-4:2019.

Example

const lhs = CieLabD50d(50, 2.6772, -79.7751);
const rhs = CieLabD50d(50, 0, -82.7485);
const value = lhs.deltaE76(rhs);

assert(value > 4.00106 && value < 4.00107);