How is a colour magnitude diagram (CMD) actually created?

Here, HST data of the core of NGC 3201 (HST/ACS catalogue, Sarajedini+, 2007) is shown.
The colour represents the visual appearance to the human eye and the stellar brightness is given by the circle size:

Do you see any pattern? Maybe that most stars share the same white colour and faint magnitude.

When the x-axis is sorted by colour ...

... and the y-axis sorted by brightness (magnitude) ...

we end up with the colour magnitude diagram (CMD of NGC 3201) which is fundamental in astrophysics:

The CMD with stars that could be explained by stellar evolution of single stars:

 The so-called 'binary main sequence' (yellow region):

And blue straggler stars (blue region):