title: Raphael Sphere with shaded color - How to find the hue value of the color
body: <p>I got ready function to create a Sphere using Raphael javascript. Below is the code</p>
  
  <pre><code>Raphael.fn.ball = function (x, y, r, hue) {
              hue = hue || 0;
              return this.ellipse(x, y, r, r).attr({fill: "r(.3,.25)hsb(" + hue + ", 1, .99)-hsb(" + hue + ", .5, .25)", stroke: "none"});
          };
  </code></pre>
  
  <p>This function creates the sphere with the shaded color inside it. The color is generated using the hue variable passed to it. In the orginal code the value of the hue parameter was taken from 'Math.random()'. But now i want my expected color shade to the sphere. I have Hex codes for the expected code, but I dont know how to get exact hue parameter value to generate same color.</p>
  
  <p>Basically I want to understand - </p>
  
  <ol>
  <li>How I can read the expression - "r(.3,.25)hsb(" + hue + ", 1, .99)-hsb(" + hue + ", .5, .25)"?</li>
  <li>How I can find the hue parameter value to get given color(e.g. - #FEFE31)</li>
  </ol>
  
  <p>Note: I am using HTML and javascript only</p>
  
  <p>Any help is highly appritiated</p>