Iterate through the bitmap making a list of every pixel's colour, not forgetting to ignore duplicates. Then sort the list into whatever order you prefer, e.g. reds, greens, blues etc. Then go through the list and draw a shape in the window for each colour. See the
GetPixel
method[
^] for further information.