matfish Posted July 13, 2009 Share Posted July 13, 2009 Hi, I've been searching but can only find color pickers of which you have to use a palette. Does anyone know of a color picker where I can pick a color from anywhere on the page - like FireFox's ColorZilla - but javascript? Many thanks Quote Link to comment Share on other sites More sharing options...
matfish Posted July 13, 2009 Author Share Posted July 13, 2009 Eye-dropper may be another word I'm looking for? But still can't find one which will allow you to pick any color on the page. Quote Link to comment Share on other sites More sharing options...
haku Posted July 13, 2009 Share Posted July 13, 2009 Here you go. It's part of the jquery interface elements: http://interface.eyecon.ro/demos/slider_colorpicker.html Quote Link to comment Share on other sites More sharing options...
matfish Posted July 13, 2009 Author Share Posted July 13, 2009 Hi, thanks for the reply. This is a nice interface, but it still does not do the eye-drop on any part of the page. This is still restrictive to the colour palette only. Any others? Thanks Quote Link to comment Share on other sites More sharing options...
haku Posted July 13, 2009 Share Posted July 13, 2009 Ahh, I see what you are saying. Never seen one of those myself. You could probably build one yourself if you were determined enough - it really wouldn't be too hard. Change the cursor to a crosshair, then get the color of the pixel in the crosshair. You could link that to the background color of a div, and have it automatically load the current color into that div. Quote Link to comment Share on other sites More sharing options...
matfish Posted July 13, 2009 Author Share Posted July 13, 2009 Really not advanced enough in Javascript to build something like that but I see where your coming from. If anyone else stumbles across this post and has one of these, please let me know. Thanks for your help. Quote Link to comment Share on other sites More sharing options...
haku Posted July 13, 2009 Share Posted July 13, 2009 I just spent a bit of time looking into it (I thought I could build one myself in a few minutes), and it appears that I was wrong - it's not actually possible to do. You can't get the color reading of a pixel through javascript. I assumed you could, from that color picker I linked to earlier, but the color picker knows the color of each pixel because it has created the color scheme from which it is drawing the values. So it's doubtful that you will find this anywhere else either unfortunately. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.