Could someone please explain to me how to get a pixel's color. I want to change this into C++ code, please:

If the color of this pixel is yellow
Then click here.

Thank you