title: Correct formula for determining the hue of a CIE L*a*b* color
body: <p><a href="http://www.easyrgb.com/index.php?X=MATH&amp;H=09#text9" rel="nofollow">EasyRGB</a> gives the following formula for determining the hue (and chroma) of a CIE L*a*b* color:</p>
  
  <pre><code>var_H = arc_tangent( CIE-b*, CIE-a* )  //Quadrant by signs
  
  if ( var_H &gt; 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
  </code></pre>
  
  <p>However, it gives the formula below on <a href="http://www.easyrgb.com/index.php?X=DELT&amp;H=06#text6" rel="nofollow">this page</a> (used by the Delta CMC algorithm):</p>
  
  <pre><code>CieLab2Hue( var_a, var_b )          //Function returns CIE-H° value
  {
     var_bias = 0
     if ( var_a &gt;= 0 &amp;&amp; var_b == 0 ) return 0
     if ( var_a &lt;  0 &amp;&amp; var_b == 0 ) return 180
     if ( var_a == 0 &amp;&amp; var_b &gt;  0 ) return 90
     if ( var_a == 0 &amp;&amp; var_b &lt;  0 ) return 270
     if ( var_a &gt;  0 &amp;&amp; var_b &gt;  0 ) var_bias = 0
     if ( var_a &lt;  0               ) var_bias = 180
     if ( var_a &gt;  0 &amp;&amp; var_b &lt;  0 ) var_bias = 360
     return ( rad2deg( atan( var_b / var_a ) ) + var_bias )
  }
  </code></pre>
  
  <p>To worsen matters, <a href="http://en.wikipedia.org/wiki/Lab_color_space" rel="nofollow">this Wikipedia page</a> states the following:</p>
  
  <blockquote>
    <p>CIELUV can also be expressed in cylindrical form (CIELCH), with the
    chromaticity components replaced by correlates of chroma and hue.</p>
  </blockquote>
  
  <p>One could conclude that this means that CIE L*a*b* should be first converted to CIE L*u*v* before the hue can be determined.</p>
  
  <p>Can anyone shed any light on this?</p>