I would like to create a Script to identify colors that appear on my computer monitor. The idea is that whenever a color appears on the monitor, a click is executed. My problem is that this needs to be done considering the whole monitor and not just the browser page, so if I minimize the monitor and this color appears on my desktop I want the click to happen. I wanted to know if JavaScript can do this and what paths I should follow to be able to implement it.
You could use this lib https://github.com/seiyria/pixcolor which is based on a edge-js fork which let C# code to interact with JS. Then once you got the pixel colors you could use https://github.com/octalmage/robotjs to automate system click.