41
3
Your task is to write a program that makes your screen appear to have a bad pixel.
You should choose exactly one pixel on the screen, and exactly one channel between red, green and blue, and make its value either always 0 or always maximum (usually 255). The values of other channels should be the same as if your program didn't run.
You can choose the pixel and channel in whatever ways, such as hardcoding it or generate it randomly on each run. But it must always be visible on fairly modern hardwares.
If the color that originally should be displayed on that pixel has changed, your program should update in less than 0.5 seconds when the system is fast enough.
You cannot make assumptions about what is currently displayed on the screen (such as a taskbar using the default theme).
Your program doesn't need to work when a screensaver, login screen, effect from a window manager, etc, are active.
Shortest code wins.
1Can we assume a specific OS? – Loovjo – 2016-12-11T15:01:23.740
@Loovjo Yes, you can. – jimmy23013 – 2016-12-11T16:00:07.463
Ow... the requirement to preserve the other channels probably doubles my already-ridiculous byte count. – Bob – 2016-12-12T03:41:20.323