This is an exampe of a simple "color spy" that gets the RGB values and HTML color code of the pixel under the mouse cursor. It also adds a small zoom window with a crosshair so you can easily choose the color you want.
Example uses various API's for getting the pixel color, mouse position, and drawing the zoomed view of the screen.
Code is based on examples by Plastik (https://www.dosfx.com/~plastik/vb.htm) and Rocky Clark