electron-color-picker icon indicating copy to clipboard operation
electron-color-picker copied to clipboard

Access to native pickers

Open ferllings opened this issue 6 years ago • 4 comments

Hello,

Is it possible to get access to the OSX/Windows native pickers source code? I would like to add additional features, like keyboard navigation, and see if this is possible to also return the picker position, (to detect the display, and find the color profile for color conversion)

Thanks

ferllings avatar Oct 07 '19 08:10 ferllings

The repo is at mockingbot/mb_colorpicker_desktop_native, and the code kept minimal to just do the job.

If more additional features is needed and bloat is OK, you may check the previous Qt version at mockingbot/mb_colorpicker_desktop_qt.

ThatBean avatar Oct 08 '19 03:10 ThatBean

Thanks, I agree this should stay minimal. But the picker works in sRGB color space, which returns wrong results if your display is not in sRGB. So I believe an option/way to adjust that should be included. I'll try to provide a PR in the next few weeks.

ferllings avatar Oct 08 '19 07:10 ferllings

That's a problem we did not fully solve, it'll be great if you can work it out.

In our use case, mainly it's for getting color from browser. But last time we checked, the same CSS color in different browser displays different on screen. Maybe it's software related too, and there's so questions like this.

ThatBean avatar Oct 09 '19 00:10 ThatBean

Yes, I'm well aware of this issue. Even with browsers you can get different color results: Firefox use sRGB color space, while Chrome and Safari use the display colorSpace. And if, like me, you have 2 displays, with 2 diff. colorSpace2, and you test on multiple browsers, that's a nightmare to get accurate results :) So it's not possible to fix this because the picker can't know what browser he's hovering, but at least I can try to make it possible for the user to choose the colorSpace for the picker to operate, or, to convert it to.

ferllings avatar Oct 09 '19 07:10 ferllings