T3
Colour

Colour #1: The RGB Cube

rgb(128 128 128)
A capital W rendered with ClearType, enlarged until the individual red, green and blue subpixels of each screen pixel are visible.
Michael Geary, public domain
A glacial lake at sunrise, mirror still, with snow-streaked mountain peaks lit warm above a dark band of pines, and turquoise water running clear over pale stones.
publicdomainpictures.net, CC0

Every colour on your screen is three numbers

Your screen makes colour by mixing three lights: red, green and blue, each ranging from off (0) to full (255 or 1, depending on what the vibe is). Every colour you see is a combination of those three numbers.

Black is when all the dials are set to 0, white is when they are all set to 255, and every other colour is somewhere in between. The three numbers are called the RGB values of the colour.

Three dimensions make a cube

We can take each of the three numbers and use it as a coordinate in a three-dimensional space. The red value is how far along the x-axis we go, the green value is how far along the y-axis we go, and the blue value is how far along the z-axis we go.

This forms a cube, where each point in the cube corresponds to an RGB colour your screen can display.

The corners have familiar colours

In each cube’s corner, all of the RGB values are either completely off or completely full, making those colours very distinct from one another. In fact, the corners of the cube are exactly all the primary colours, secondary colours, as well as black and white.

The primary colours are the red, green and blue we picked out earlier, the secondary colours you get by mixing two primaries together, and black and white are the extremes of all three colours being off or on.

RGB is additive

Your computer screen emits light, and mixing different colours of light will make for a brighter colour overall.

Mixing all the colours will give you white. Mixing no colours at all will give you black — no light is coming from the screen at all.

This is called an additive colour model.

CMYK is subtractive

Putting ink on paper works the other way: The paper is white with no colour on it at all, and the more ink you add, the darker the colour gets. For print, the most common colour model is CMYK, which stands for cyan, magenta, yellow and key (black).

Note how the primary colours of RGB are the secondary colours of CMYK, and vice versa! The two colour models are like opposites of each other.

CMYK uses a dedicated black colour, because mixing cyan, magenta and yellow inks together will not look as dark as a true black, and it would also be more expensive to print.

Screens use RGB, quite literally

Your screen is made up of a grid of pixels, and each pixel is made up of three or more subpixels, consisting of LEDs that emit red, green and blue light. They are small enough and far enough away that your eye blends them together, and you see a single colour.

If you are able to defocus your eyes really hard, you can make the image above blur into a single grey colour; squinting helps too. It’s a bit like you’re lowering your eye’s resolution to 360p!

The real world does not work that way

When you look into the sun (please don’t) or even manmade light, you will never see subpixels like this.

The sun emits spectral light — it’s the real thing that screens only ever approximate. Light has infinitely many more colours than just red, green and blue!