I was just trying to detect similar colors in a picture.
First I load a picture in a picturebox and then I select some hundreds of similar colors in the picture using the mouse and getpixel api.

In another picturebox (it's empty, so no picture has been loaded), the program sets the pixel to blue if that color has been selected from the original picture.

The problem is I've to select tons of different pixels from the original picture to get a good result. In case that I only select a few ones, then I will see some small blue pixels in the second picturebox.

I remember that I've use a software where you can select just a pixel and the program detects all the similar colors.

How can I do it?