The problem of RGB

Many of you will already be aware of the fact that internally, within the hardware of the computer itself, colours are represented and displayed on the screen in terms of "pixels", which are individual dots of colour. All colours are defined as mixtures of 3 basic colours, red, green, and blue, each of which can have a strength of between 0 and 255.

Here is an example of a colour expressed in RGB: Red=113, Green=54, Blue=192. Don't worry about what actual colour this really is. I can't remember either. Now, how would you alter these values in order to preserve the basic colour but make it lighter? If you play about with these values, you are more likely to get a different colour than to achieve your objective. The idea of defining all colours as a combination of red, green and blue (0-255 for each) may be useful for the internal functioning of the computer, but this system is absolutely useless to human beings who simply want to make alterations to the colours in terms of "lighter", "darker", "stronger", "weaker", etc. No, what we need is another system of describing colours where we can specify these things inituitively and where we can easily see the characteristic differences between one colour and another.

A number of such intuitive systems of colour description exist, but the one chosen for use with Rubber Dub-Dub is called "HSL". "H" stands for "Hue" (i.e. the basic colour), "S" stands for "Saturation" (i.e. how strong or weak this colour is), and "L" stands for "Luminance" (i.e. how light or dark the colour is). With HSL you can not only see these three characteristics for a given colour quite easily, but you can also easily see the difference between one colour and another in these respects. For example, in HSL, H=5, S=30, L=95 is a kind of light red colour. If we compare it with H=5, S=70, L=85 we know that it is basically the same red colour, but considerably stronger and a little darker.

Unfortunately, Windows does not offer the HSL colour system as an alternative to RGB in programming. However, all colour descriptions in Rubber Dub-Dub are in HSL (for your convenience), so this means that internally the program has to extract the pixel values from your picture in RGB, convert them to HSL for you to view and perhaps specify alterations to hue, saturation, or luminance, and then convert them back to RGB for plotting again in your picture. The algorithm for doing this is far from simple, but you do not have to worry about this. RD-D does it faster than the time it takes to blink your eyes.

Before going on to actually using the HSL colour system in RD-D, we suggest you go on to the next section in order to learn a little more about it:

HSL Colour System