-
Notifications
You must be signed in to change notification settings - Fork 780
Description
The sample implementation in section of 19.1. ΔE2000 of CIEDE2000 has a discrepancy in the computation of the mean hue angle
The offending line exists on line 103 of the code snippet:
if (Cdash1 == 0 && Cdash2 == 0) {where hdash in code) is set to hsum if Cdash1 and Cdash2 is zero, which differs from the specification condition that
if (Cdash1 * Cdash2 === 0) {The above condition is correctly implemented for the computation of Δh in code) as seen on line 75 of the implementation.
Mathematically, the discrepancy does not matter in the final computation of the ΔE2000 value since having either
However, the intermediate values
A specific test pair of:
Reference L = 50.00, a = 0.000, b = 0.000
and
Sample L = 50.00, a = 10.00, b = -114.3
can be used to show large deviations between the two specifications for the
I was wondering what the rationale behind the change in implementation is, as the code comments don't seem to note anything about this discrepancy.