Using a list of countries generated by The World Factbook database, flags of countries fetched from Wikipedia (as of 26th May 2007) are analysed by a custom made python script to calculate the proportions of colours on each of them. That is then translated on to a piechart using another python script. The proportions of colours on all unique flags are used to finally generate a piechart of proportions of colours for all the flags combined. (note: Colours making up less than 1% may not appear)
More here, via Statistical Modeling. The individual countries' pie charts can be clicked on to reveal the actual flag:
For those not interested in making this into a Sunday quiz, here is a very persuasive case for a governmental ban on pie charts (including the best-in-its-class pie chart joke).
And finally, the readers most serious about packing information in the most efficient (and colourful) way will enjoy this paper by Gelman et al. on turning tables into graphs.