Tuesday 23 March 2010

Colour is complicated - Part 1

[Takes a deep breath]

When I posted Colours, files and compression on Saturday I knew I was going into a subject which few people would understand or even think about. FFS I don't really understand it :)

In no way was I dissing JPEG. For holiday snapshots and internet posts it's perfect, but it is the mp3 of photography and I'm advocating care and awareness when editing. How would it be if you opened a text document and 1 in 100 random words were subtly misspelt? Or 1 in 1000? Where is the tolerance threshold?

In that last post I tried to explain a bit about how colours are stored on your computer, but I only intimated that the same information is used to activate the glowing pixels on your monitor (or a TV). Each pixel on the screen has a red, a green and a blue light-emitting segment; the mixture makes the colour of the pixel. Get a magnifying glass and look at your monitor screen.

Red, green and blue (RGB) I called 'primary colours' and Jill asked

"I was an art major so I know the three primary colors are red, yellow and blue, but your example replaced yellow with green. Please explain. Thanks!"
You're correct Jill, everyone who has done any kind of art class knows the primary colours are red, yellow and blue.

So WTF Holroyd? Well, anyone who has done any kind of physics class knows the primary colours are red, green and blue.

Note, and I'm not being smug, in Saturday's post I was careful to say "...this is coloured light, NOT paint" and therein is a world of difference.

The truth is Jill and myself are both right, but to get the full picture we have to think about additive primary colours and subtractive primary colours.

To do that we need to know a bit about light and a bit about how paint interacts with light, but most importantly we have to consider how our eyes and brain decide which colour is which. It may take some time to get to a discussion of the colour 'yellow'.

So to start "What is light?" Well, if you want waves vs photons then it's neither, but that’s another post. I'll choose waves as a good model because they are familiar but, unlike water waves, the crests of all light waves are at the same height. They differ only by the distance between the crests of the waves - the wavelength. Red light has the longest wavelength, then green and then blue with the shortest.
This is a simplistic drawing but you may see there are 4 peaks of blue, 3 of green and 2 of red as wavelength increases. Where is yellow? At about 2½ on this scale (Arggg! I won't try to plot yellow it because the whole diagram is silly). The message is colour = wavelength. A consequence of physics is that short wavelength blue light carries more energy than long wavelength red light. This is the distinction, colour = wavelength = energy, which gives the beauty of a rainbow or indeed, the colour of anything.

I'm tired and can't concentrate no more.

To be continued...

6 comments:

Bill Lisleman said...

thanks for putting this up here. You know Newton and Einstein both worked on different aspects of light so you are working in some fine company.

Andy Holroyd said...

Geez, I'm not in that league but thanks anyway. The next part will be coming soon.

NobblySan said...

A little over 20 years ago, I spent a week at Durham University on a maths summer school. The whole thing was fascinating, but one evening lecture that really grabbed my attention was the maths behind the physics behind rainbows.

If only I could remember any of it now.....

Bugger!

Andy Holroyd said...

Was that an Open University summer school Nobbly? They are brilliant.

I forget the details of rainbows too, internal reflection inside the raindrops and something to do with cones to give the shape. It's something to look up, but I'm trying to avoid any maths in these posts.

NobblySan said...

Hi Andy.

Yeah, I was doing maths foundation level with the OU. It was 1989; No1 son had been born in late May, and I announced that I was off to Durham for a week in early August - I was not popular!

John and Barbara Jaworski were on the tutoring staff, together with a few others who really helped make the whole thing fun and enjoyable. This was a revelation to me, as when at school, I had a mental block where maths was concerned, and wouldn't even begin to attempt anything that involved algebra.

Andy Holroyd said...

The blood of the Open brotherhood runs deep - [gives the traditional hand twitch from filling in CMAs]

I started in 1983 but did my maths SSs at Stirling. I did one physics SS at Durham though, at Van Mildert College, not the best part of Durham to visit :)

PS, Barbara Jaworski is well noted!