kepi / chromeEyeDropper

Eye Dropper and Color picker extension for Google Chrome
https://eyedropper.org
208 stars 73 forks source link

is it possible to make it as color picker library with eyedropper? #159

Closed sh-sabbir closed 3 years ago

sh-sabbir commented 3 years ago

I wonder if you have any plan to release it as a web usable library. Currently there is no eyedropper enabled color picker.

kepi commented 3 years ago

No plans at all. I'm not even sure if there is any public API which would make it possible. Extension is relying on extension API which isn't available from the outside.

What would be use cases for such library?

sh-sabbir commented 3 years ago

use cases are many. For example front-end page builder often needs it. Suppose I've a section with image in left and text in right. If I want to use a color from image for test I need to open the image either on online too or any image editor to pick color code (General user perspective assuming user don't know/ can't use developer tools.) . Now if I can just pick the color with an eyedropper like we can in photoshop then it will be a lot easier. For now you can limit the eyedropper for chrome only if it doesn't have cross browser support. For browser without chromium engine eyedropper will hide.

kepi commented 3 years ago

Its not about cross browser (or at least at start) but about different APIs available to extensions and to normal web page. Anyway it seams that it may be possible as there are some APIs which might help with that.

It is currently completely out of scope of this project (as web browser extension) but I'll leave issue open and think about it more. I don't have enough time for it momentarily but it may change in the future.

sh-sabbir commented 3 years ago

I've attempted based on your source code for edropper and webRTC. if you have free time you can have a look here https://github.com/uzumaki-sabbir/eyedropperJs I idea is to use webRTC to grab a screenshot then extract pixel color. I know it's not the best way to take tab screenshot.

kepi commented 3 years ago

I'm closing this as it is really out of scope of the extension. I hope you'll get through with it, as for free time, thats the problem :smile: