Random Colours (part 3)

Posted in Art by Julyan Arbel on 24 September 2010

Thanks to Pierre, we now have a new playground for saptial stats, see this post. Before that, let’s see if we can see basic stuff without spatial information.

Data consist in three 32*32 tables, R, G and B, of numbers between 0 and 255. Certainly, the tables should be considered together as a 32*32 table of (r,g,b) vectors. Still, the first basic thing to do is to plot three separate histograms for R, G and B:

compared to uniformly simulated data

We see that the painter has a bias for darker colors, and rather misses light green and light blue ones.

Then, what can we do for representing (r,g,b) vectors? I guess that a good visualization is the color triangle

A few words to explain where it comes from. Say (r,g,b) data is normalized in the unit cube. Then the corners of the color triangle correspond to (plain) red, green and blue, from bottom left, right, to top. It is a section of the cube, with two opposite and equidistant points: black (0,0,0) and white (1,1,1). This triangle is said to be a simplex: any of its points’ coordinates sum to 1. Now the data in the triangle is obtained as (r,g,b) points, diveded by (r+g+b). It took me a while to compute the coordinates (x,y) of those points in a basis of the triangle (I did that stuff more easily back in highschool!). It should give something like that:


What do we see? The colors do not look like uniformly distributed, because 1) points are much more concentrated in the center, and 2) the painter favoured red colors in comparison with green ones (very few in the bottom right corner) and blue ones (in a minor extent). Arguing aginst point 1) could be that projecting (r,g,b) points on the simplex naturally implies a higher density in the center. That is right, but it would not be that dense, as we see with uniformly simulated data:

So colors are not uniform in the RGB model. There should be a cognitive interpretation out there, no? It is not obvious that human eyes comprehend colors on the same scale as the RGB model does. If not, there is no reason for human sight to comprehend uniformity in the same way as a computer. As Pierre pointed out, what we find in the RGB model might be different in the HSV model.We’ll see this model later.

Next step, spatial autocorrelation tests?


8 Responses

Subscribe to comments with RSS.

  1. Julien said, on 24 September 2010 at 22:50

    May also want to check the marginals of the contigency table. And/or, for fun, inverse the distribution function and remap the full triangle with this inverse function, to see what a world where his colors would be uniform would look like — you can apply this inverse mapping to actual pictures and enjoy “his” world 🙂

  2. pierrejacob said, on 27 September 2010 at 08:43

    Cool Julyan!

    Actually looking at his wikipedia’s webpage, the painter has actually used a computer to draw colours, at least in his work for the stained-glass windows of Cologne cathedral.

    It doesn’t give much details but I thought it was funny. We could actually try to contact the painter, he might find this series of posts entertaining. Plus if you could invite him at CREST to give a talk about art and randomness it’d be awesome!

  3. Statisfaction said, on 6 October 2010 at 20:43

    […] providing four projects, one of which is the following (echoing a series of posts here, here and here): Critique statistique d’une peinture […]

  4. Michaël said, on 22 October 2010 at 10:09


    I think there may be a problem because you don’t use the original work, but a reproduction (photography most probably) that transformed it a lot (light, color etc…). Just compare those two paintings :

    I think both of them should have the same border, whereas the second one appears much darker.

    In this case, it could be interesting to think backwards : if we know that the original distribution is uniform (according to Wikipedia), how did the photography transform the distribution ? And could we use the inverse transformation to get the real colors back on other paintings ?

  5. pierrejacob said, on 23 October 2010 at 00:10


    indeed that would be an interesting thing to do. The problem would be that, even for 10 colours there is a huge number of paintings that would be accepted by any statistical test checking for uniformity. We would therefore have to find the painting that is the closest to the photography (according to some metric) among all the paintings that are accepted by a the test, which seems difficult to me.


  6. Triathlon in three colors « Statisfaction said, on 23 November 2010 at 19:18

    […] The following triangle is obtained as in this post: […]

  7. Graph gallery in R « Statisfaction said, on 6 January 2011 at 15:34

    […] This one only lacks colors. I definitely should write the Richter plot R package! […]

  8. […] As a preliminary descriptive study, the following scatter plots come and complete the triangle plot.The R function , from the package of the same name, displays the pixels with their coordinates in […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: