Steven Barrett Steven Barrett - 5 months ago 30
jQuery Question

change value of colour picker based on variable onclick

On my program here:

I want to add an eyedropper tool. Now this much I feel I can implement by clicking the dropper icon then clicking somewhere on canvas, and then saving the hex value to a variable.
What I need help with is how to change the colour picker value I have with this variable?
This is the code for the colour picker and you can see it on the link provided.

flat: true,
onChange: function (hsb, hex, rgb) { brushColour = "#" + hex; },

I plan on using this eyedropper:


Presumably this is ?

It looks like you can just do: