1

I need to know how the eyedropper tool of Chrome browser works without the need for canvas element and why can't we achieve it using javascript.

I have visited these two threads -
JavaScript eyedropper (tell color of pixel under mouse cursor)
Canvas eyeDropper

I have understood that if we need to implement it in our application, it can be done either using Canvas or using PHP in the server side. I need to know how does it internally works in Chrome browser without the need for canvas or without the cross domain restrictions.

vbrin27
  • 723
  • 1
  • 6
  • 25
  • Chrome plugins have a large [API](https://developer.chrome.com/extensions/api_index) available that allows you to do a lot more than you could do with just JS. That said, what you want isn't possible in a webapp / website. – Cerbrus Sep 05 '17 at 07:00
  • One solution (if all the content is same domain) is to use HTML2Canvas and then use the generated canvas to pick the pixel colors (There are limitations and it is not a perfect pixel to pixel match) Or you can create extensions for each browser you wish to support, that will provide additional privileges and API,s that will give you access to pixels and thus colors. – Blindman67 Sep 05 '17 at 20:34

0 Answers0