RGB Project in Codea using SVG Color Map

On Monday this week Simon spent hours converting hexadecimals into RGBA values for the 140 colors supported by all modern browsers and creating a color file in Codea. He used the w3schools color map available at https://www.w3schools.com/colors/colors_groups.asp and an html color codes converter http://html-color-codes.info/ 

Some of the color names were quite exotic (like Chartreuse or Bisque ), and we looked those up together in the dictionary. We also took a very close look at the relation between red, green and blue values and found out that red was added every time to make colors lighter, even in shades where you would not expect any red.

Simon later made a nice design pattern in Codea using the color file:



Color Box in Processing. Simon’s own code.

“This one doesn’t have that much code inside!” – Simon explains. It’s still a fun idea though: drawing a box (a cube) that “has all of the colors you can possibly see” in it! And you can make it change colors by moving the mouse. Every face of the cube is a different set of colors (the vertices are quite blur, so you might not be able to see the cube shape immediately). By moving the mouse to the left you get black, red, yellow, green, and by moving to the right – blue, magenta, white, cyan.

How do we see colours

Colours continue serving as a gateway to science. Simon has been comparing mixing paints and light waves and came to the conclusion that primary colours in paint (magenta, yellow, cyan) are the secondary colours in mixing light and the other way around – the primary colours in mixing light (RGB – red, green and blue) are secondary when mixing paints. When mixing the maximum intensity of all the three primary colours in paints you get black (no light), when mixing all the three light waves you get white (maximum light). That’s how light and paint are the opposites of each other, Simon told me.

– How do we get violet paint? – I asked.

– We add full intensity magenta, and half intensity yellow and half intensity cyan.

– But why do we see violet? – I asked.

– It’s because all the green light is being absorbed, and all the blue light is being reflected, and 60 percent of red is being reflected! – Simon explained. He can also give similar explanations about other colours.

Colours are Math Too

The last couple of days have been dominated by the colours theme, that eventually ended up expressed in fractions (of how to mix the primary colours as in paints or the primary colours as in RGB light waves). In the artwork-like chart above Simon got all the shades by mixing the three primary colours. On the pictures with plastic cups he was trying to design a colour ‘genealogical tree’.

The tall beer glass has liquids of different density in it that don’t mix. He also experimented with different temperatures of water to see if the paints dissolve better in hot water. The straps of paper towel with colourful flames on them are the result of deconstructing felt pen inks. The next hypothesis (expressed here in fractions) that any colour can be created by simply adding up the necessary amount of the primary colours was experimentally tested as well. The last illustration is a scan of a text he wrote this morning (using nothing but his memory as resource) explaining how a human eye works and how the RGB light waves mix.

Kleuren mengen breukenRGB en grijstinten uitleg Mei 2016

We have also watched a cartoon about the Indigofera and why there is so little blue in organic substances, experimented with trying to see infrared light (through a mobile phone camera) and read about how tiny the visible spectrum is. Simon’s maths teacher told him about how the same three RGB colours make up the three quarks in a proton!