I am trying to build a program that detects the color that is under the mouse cursor and then displays …