title: Problem in Javascript colors and canvas
body: <p>I have used this code to exactly try to have the RGB code of color:</p>
  
  <pre><code>var huePixel = HueCanvas.css('background-color').match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);//["rgb(0, 70, 255", "0", "70", "255"]
  var svPixel = SVCanvas.get(0).getContext("2d").getImageData(satPos,valPos,1,1).data;
  //opacity*original + (1-opacity)*background = resulting pixel
  var opacity =(svPixel[3]/255);
  var r =parseInt((opacity*svPixel[0])+((1-opacity)*huePixel[1]));
  var g =parseInt((opacity*svPixel[1])+((1-opacity)*huePixel[2]));
  var b =parseInt((opacity*svPixel[2])+((1-opacity)*huePixel[3]));
  </code></pre>
  
  <p>The problem is that in some pixels , the RGB is not exactly the same . If i use Math.round than parseInt there is more problems , and more pixels have little changes than real ones.</p>
  
  <p>I know that the problem is in <code>var opacity =(svPixel[3]/255);</code> , but i dont know how to put the equation to not have that problems.</p>
  
  <p>Thanks for your attention.</p>