A while back, having nothing better to do, I set about creating an image with all the RGB colours. Yes, that’s right. All 16.8 million.

This little show of lunacy also turned out to be a great demonstration of the powers of the PNG image format: The graphic, being 16.8 million pixels and 24 bit colour, ends up a modest 50 MB uncompressed. The PNG format produces a 58.0 kB file.

Before you take look at this (truly) colourful piece of art, I warn those with slow computers. Don’t let the light download trick you – the graphic packs a nice punch to the CPU if you’re on something like 400 MHz.

Update: Per popular request, I have now created a version of the image with all pixels randomized… (This time it’s a bit more than 58 kB…)

And how about a little mathematical challenge: What are the chances that, by randomizing the pixels in the (randomized) image above, I would get the (ordered) version at the top? 🙂

Update 2: I created another version of the ordered image, with the squares laid out along the diagonal of the image instead. This one (78 kB) didn’t compress quite as well as the first one (58 kB).

Edit 2011-06-30: Was inspired by one of the comments to try and compress the 58 kB png file. IzArc can create a 7z file which is only 705 bytes large! That is 1/71436th the size of the uncompressed image in Tiff format. That’s pretty impressive stuff!