I am having a hard time manually converting CIELab to CIELCh with my calculator.
According to http://www.easyrgb.com/en/math.php, the following is a neutral language programming code to get from CIELab to CIELCh by going from radians to degrees:
var_H = arc_tangent( CIE-b*, CIE-a* ) //Quadrant by signs
if ( var_H > 0 ) var_H = ( var_H / PI ) * 180
else var_H = 360 - ( abs( var_H ) / PI ) * 180
CIE-L* = CIE-L*
CIE-C* = sqrt( CIE-a* ^ 2 + CIE-b* ^ 2 )
CIE-H° = var_H
And on this website, it gives the same code but assumes everything is already in degrees: http://www.brucelindbloom.com/index.html?Equations.html
When attempting to convert CIELAB code (37.80, -21.59, 38.17) to CIELch via my physical handheld calculator, I get the value (38, 43.851, 299.49).
However, the correct value is (38, 43.851, 119.499).
This means that everything is good for the first two parts, but the last part is incorrect.
I don't understand how they obtained 119 instead of 299. I believe there may be an error in the math. The following is how I was able to retrieve 299 via a calculator:
I took the arctangent of (38.17/-21.59). I retrieved the value of -1.056 radians. According to the code, if var_H < 0, then you need to do:
var_H = 360 - ( abs( var_H ) / PI ) * 180
So I did 360 - (1.056/3.14)*180.
And that gives 299.
So what am I doing wrong here? How do I get value of 119???