David Naylor: Blog

Web Browsers, Photography & Stuff

21 February 2005

All 16,777,216 RGB colours

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.

All 16,8 million RGB colours

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...)

All 16,777,216 RGB colours, randomized.

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).

All 16,777,216 RGB colours, with tiles ordered along the diagonal of the image.

53 Comment(s):

Post a Comment

<< Home