I've been trying to track down a problem with this code for days, and finally found it. Your DeltaE2000 conversion method did not match other formulas online I've found for computing DeltaE2000, and it was producing results that didn't seem to make sense given the colors we were trying to match.
As it turns out, your formula had one consistent mistake - instead of using rad2deg to convert radians to degrees, you should be using deg2rad, as PHP trig functions take radians as arguments, not degrees. See http://php.net/manual/en/function.sin.php. With this simple change your formula matches perfectly - and is extremely helpful to me. Thank you!!
Hi,
I've been trying to track down a problem with this code for days, and finally found it. Your DeltaE2000 conversion method did not match other formulas online I've found for computing DeltaE2000, and it was producing results that didn't seem to make sense given the colors we were trying to match.
As it turns out, your formula had one consistent mistake - instead of using rad2deg to convert radians to degrees, you should be using deg2rad, as PHP trig functions take radians as arguments, not degrees. See http://php.net/manual/en/function.sin.php. With this simple change your formula matches perfectly - and is extremely helpful to me. Thank you!!