then I made a screenshot, open that screenshot png file in image editor, compare the color of that same position with the color picked through PIXEL function, they are not same.
Hi @ayrtbh This is a nice idea. However, unfortunately I can confirm that your Macro does not pick the correct RGB values as you can confirm by using the inbuilt eyedropper in the Apple Color Picker.
The correct RGB values for the blue square above are 146,179,242 but the your Macro shows them as 162.194,245
Like you say the error maybe is in the maths - maybe a rounding error?
But this got me thinking that since the Apple Color Picker itself has an eyedropper tool to select colors (as I used above) why not just make a hot key with Keyboard Maestro to invoke the Color Picker and then use its accurate eye dropper?
After a bit of Googling I found the System Shortcut for the Color Picker is โงโC
But it doesn't work in all Apps. The AppleScript to invoke the Color Picker is:
choose color
So, the below Keyboard Maestro Macro works to make โงโC open the Color Picker in all Apps. Maybe there is a way to select the eye dropper tool itself using AppleScript?).
It says AppleScript's color value is between 0 to 65535, the original math was 'Math.trunc()', I use Round() in Keyboard Maestro instead, the picked color was in 'right direction' but not very close.