The Wonderful World of Colour!
07 Aug 2009 12:54
07 Aug 2009 12:54
07 Aug 2009 12:54
07 Aug 2009 12:54
nav_first.pngFirst: blog:1
My first blog!
Edited: 06 Nov 2011 11:49 by: James Kanjo
Comments: 2
Tags: ads blog css facebook first free myspace program programming wiki wikidot
nav_prev.pngPrevious: blog:44
We want autosave!
Edited: 06 Nov 2011 12:06 by: James Kanjo
Comments: 11
Tags: programming wikidot wish
Last: blog:77
Wikidot: CSS Per Category
Edited: 04 Mar 2012 05:54 by: James Kanjo
Comments: 3
Tags: programming wikidot
Next: blog:46
Unpopularised Music
Edited: 06 Nov 2011 11:53 by: James Kanjo
Comments: 1
Tags: music piracy society

These are the primary colours of the visible spectrum — meaning that all human perceived colours derive from proportions of red green and blue.

In most popular imaging programs, you have the option to “invert the colours” of your image. So it changes each pixel to its opposite colour. The opposite of black is white. So all black pixels are made white. Likewise, all white pixels are made black.

But what about other colours? How can there be an opposite of blue? Or magenta? This is something I delved into recently, and here is what I've discovered.

Let's start off with the basics. If something has the colour black, then it is absorbing all colours of the visible spectrum. If something is white, it is absorbing no colours of the visible spectrum. The colours we see are the colours that are reflected into our eyes by the product in question.

When we talk about colours, we talk about the colour being reflected to our eyes1. So when we talk about the colour white, for example, we are talking about a colour that has 100% red, 100% green and 100% blue in it.

Black is the opposite of white; it has no colours in it (or more correctly, no colours are reflected into our eyes). 0% red, 0% green and 0% blue.

This is when it occurred to me that perhaps “inverted colours” are merely “inverted percentages” of the primary colours. As it turns out, I was right.

For the sake of simplicity, I will refer to colour percentages like this: RGB(10%,20%,30%), which means "10% red, 20% green and 30% blue".

Primary Colours RGB(100%,0%,0%) RGB(0%,100%,0%) RGB(0%,0%,100%)
Inverted Colours RGB(0%,100%,100%) RGB(100%,0%,100%) RGB(100%,100%,0%)

Now if we try to blend each colour with its inverse, then we should always get WHITE. But we can't really test that to prove the colour theory. Instead, we must try to blend each colour with its inverse over twice the surface area… i.e. a chessboard. If we do that, then the blended colour should always appear to be Grey, or RGB(50%,50%,50%). Blue and yellow are opposites, so lets test them together:

If we shrink each colour down to 1x1 pixels, then it should blend into grey:

Isn't that amazing? Blue blended with yellow makes grey. The same colour grey happens if you mix:

  • Red & Cyan
  • Green & Magenta
  • Black & White
  • Colour & Inverse

Studying colours is an awful lot of fun — I highly recommend it if you are tremendously bored and feel like doing something nerdy beyond all imagination.

λ James Kanjo

PS. WTF? They taught us that Blue+Yellow=GREEN at school?!?!

Related pages:


Add a New Comment
or Sign in as Wikidot user
(will not be published)
- +
All content on this page is subject to the guidelines outlined here