deltaE2000

fun <T : ConvertibleToColorRGBa> T.deltaE2000(other: T): Double(source)

Computes the CIEDE2000 color difference (ΔE*00) between this color and another color, as defined in Sharma, Wu & Dalal's "The CIEDE2000 Color-Difference Formula: Implementation Notes, Supplementary Test Data, and Mathematical Observations" (2005). Unlike deltaE76's plain Euclidean distance, CIEDE2000 corrects for LAB's known perceptual non-uniformities -- weighting lightness/chroma/hue differences by where in the space they fall, and adding a hue-rotation term for the blue region. So it tracks perceived difference much more closely, at the cost of being considerably more involved to compute.

If either of the colors is not in LAB format, it will be converted to LAB before computation.

Return

The calculated CIEDE2000 color difference as a Double.

Parameters

other

The second color to compare, which should implement the ConvertibleToColorRGBa interface.


fun ColorLABa.deltaE2000(other: ColorLABa): Double(source)

Computes the CIEDE2000 color difference (ΔE*00) between two ColorLABa colors. See the T.deltaE2000 overload above for details on the formula.