octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.37k stars 961 forks source link

getPixelColor is not exact on macOS #493

Open wen911119 opened 5 years ago

wen911119 commented 5 years ago

Expected Behavior

getPixelColor should return the exact color of screen

Current Behavior

getPixelColor is not exact on macOS, the return color has diny diffrence with the real color. 20190708104906

20190708104953

Steps to Reproduce (for bugs)

see the picture above

Your Environment

dylannil commented 5 years ago

Additionally,the default color space of the Bitmap captured in OS X is not sRGB(standard RGB) which used by CSS

peec commented 3 years ago

I fixed this temporary, by setting this setting on my screen ( iMac mid-2017 ) (SRGB-...):

Skjermbilde 2021-05-16 kl  16 38 25

At least now the colors from getPixelColor is correct. I am picking my colors from a game.

ryanaltair commented 3 years ago

I fixed this temporary, by setting this setting on my screen ( iMac mid-2017 ) (SRGB-...):

Skjermbilde 2021-05-16 kl 16 38 25

At least now the colors from getPixelColor is correct. I am picking my colors from a game.

not work with MacBook Pro (13-inch, 2018, Four Thunderbolt 3 Ports)

smaugfm commented 3 years ago

Any updates on this? I am getting this behaviour on M1 13-inch MBP the color jumps between 313131 and 303030. Maybe it has something to do with True Tone?