The technology behind the images

The goal is quite simple: produce images which contain every single color exactly once, and by the way, look beautiful. I invented a computer algorithm to do just that.

Digital images are made up of little dots called pixels. Every pixel must be a different color, so the number of pixels (the size of the image) must be equal to the number of colors. I use about 17 million colors, and that gives us about 17 megapixel images. That number happens to be very special because it's all the colors that standard RGB uses (see below), and also happens to be a very good size for printed materials.

In order to understand the significance of the algorithm, let me show you three images. They all have the exact same size, the exact same colors, but the colors are distributed differently. The first one is a standard way to show all colors of a color space, it just contains colors in increasing order of R, G, B values. The second one is completely random. The third one is generated by my algorithm. See the difference for yourself.

Tech sample 1 Tech sample 2 Tech sample 3

The rainbow smoke algorithm

The algorithm can be described in quite simple terms. First, let's generate some number of different colors and store them in a list. Second, let's use the first or first few of those colors to color some randomly chosen pixels. Third, let's go through all the remaining colors in the list, and color pixels with them in a way that similar colors are placed next to each other. This can be seen in the following video demonstration.

The implementation of the algorithm is very complex. The very first version took many hours to render a single image, now it only takes seconds. It used 2000 megabytes of memory, now it uses only 200. Extreme optimizations and a reinvented 3D space search algorithm had to be used to make it fast and light weight. Even more tricks are needed for it to run on mobile phones with very limited hardware resources.

The very first version produced only two distinct patterns, which you can see in the gallery. This was enough to make the first images very beautiful and even famous, but it was only a fraction of the potential that the method has. The algorithm has to make many choices, millions of times. What's the next color? Where to put it? How to choose similar colors? It took many, many hours to develop the first version, and even more to develop those additional choices.

Even now, the algorithm is not 100% automatic. Sure, I can generate 100 new images with one keypress, but it's not the end. Only 10 of them may look interesting, then I choose 1 of them to work with. I then start fine tuning a dozen parameters, modify the algorithm in some places, and I may see a 100 new images before I settle with one that I publish. The algorithm does the counting pretty fast, that's what computers are good at. Creating and tuning the algorithm itself is also part of the artistic process.

The RGB color space

A color space is a way to describe colors as numbers. RGB may be the most widespread, it's probably used by your operating system, browser and screen right now as you're reading this. There are other color spaces, for example YUV is used for many video formats, CMYK for printed design, etc. Color spaces are convertible, it's done automatically by software.

RGB represents every color with a mix of three components: red, green and blue (hence it's abbreviated name). The most standard way to represent RGB colors is in 3x8 bits, in the range 0..255 for each component. This gives us almost 17 million colors, 256x256x256 = 16,777,216 to be exact. The 4096x4096 image resolution gives the same number of pixels, but so does 8192x2048 among others.

While a digital image, stored in a file, reaches your eyes through a screen or a printed paper, it goes through many transformations. It may be gamma corrected or color space converted by your operating system. Your display may only support 3*6 bits of color resolution. The pixels on your display or the pigments on a printed paper are analog, so they may fluctuate on a microscopic scale. A human eye may only be able to distinguish up to 10 million colors.

It is guaranteed that the raw files contain 16,777,216 different RGB colors, and the rest is up to technology. We already have the technology to display and print that many and even more colors and it's getting more widespread every day. You may already have it, my printing partner certainly does. But this is just a background story. No matter how you look at it, the images are not only technologically special, they are simply beautiful.