title: Canvas eyeDropper
body: <p>I need to implement an eyedropper tool. I want it so you click the eyedropper button to make it active, then using a onmove it will change the colour of my colour picker and when you click using onclick it will set the colour to the colour picker using:</p>
  
  <pre><code>$('#colorpickerHolder').ColorPickerSetColor(eyeDropperColour); 
  </code></pre>
  
  <p>The variable eyeDropperColour would be set using the onlick based on what colour pixel you are over.  I am wondering would I have to do it based on what layer as I have: canvas and canvasCursor.</p>
  
  <p>I have been looking at this guide but I can't make it work for my project? <a href="http://palebluepixel.org/2011/11/16/html5-canvas-eyedropper/" rel="nofollow">http://palebluepixel.org/2011/11/16/html5-canvas-eyedropper/</a></p>
  
  <p>Here is my project:
  <a href="http://www.taffatech.com/Paint.html" rel="nofollow">http://www.taffatech.com/Paint.html</a></p>
  
  <p>I have:</p>
  
  <pre><code>var eyeDropperActive = false;
  var eyeDropperColour;
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>$("#brushEyeDropper").click(function() {
  
      if ( eyeDropperActive == true)
      {
        eyeDropperActive = false;
      }
  
      else if ( eyeDropperActive == false)
      {
       eyeDropperActive = true;
      }
  });
  </code></pre>