I wrote a script to play a videogame. This script has worked perfectly on my previous Windows machine and on a Mac as well.
However, when I tried to use it today, it failed. When I looked into what was happening, the colors it was sampling from the screen were way off from what I thought they should be.
So, I downloaded Color Cop in order to look at the pixels on my screen. Color Cop should work so that the color it's showing is the color directly under my cursor. However, when I use Color Cop, the color that is displayed is always above and to the left of my cursor.
To make things even more fascinating, the more "down and to the right" my mouse is, the worse the effect is. Near the top-left of my screen the color picker works nearly perfectly.
What's going on? Why are these programs that try to detect color on the screen failing to correctly detect where my mouse is on the screen?
In case it helps, my script uses the Pillow fork of the PIL library, uses PIL to take a screenshot, and then uses pynput to detect where the mouse is. I've been able to verify that the screenshots look completely normal, and the program is able to move my mouse to the correct places on the screen. However, the part that goes to the mouse's position on the screenshot is coming up with different colors than I would expect. (And the fact that Color Cop also fails makes me think it's not my program - it's likely some setting on my computer.)
Notice that my mouse is on the "m" in "mouse" and yet the color picker thinks I'm on the "u" in superuser.
And, as we go further down and to the right, it gets worse:
Notice that my mouse is on the word "my" in the bottom right of my question, but the color picker thinks I'm on the word "color" above and to the left. (Which is way further off than the "m" to "u" case above.)