HEX colours are exactly the same as RGB, but they’re expressed using hexadecimal (base 16) numbers instead of the decimal (base 10) system we’re more used to. So we could have, say, RGB(213, 82, 7), which has a large red value and smaller green and blue values. But any whole number in between these values is also valid. The above examples show our torches either off ( 0) or on at maximum ( 255). For example, yellow is red plus green: RGB(255, 255, 0). If you’re not used to additive colour, the results might sometimes seem a little counterintuitive. To produce other colours, we just need to use different combinations of values.
To save space, we’ll use shorthand to represent some further examples: If all the torches are on and at their maximum, we instead see white: If all the torches are off, there’s no colour at all. If you already know about RGB colours, take a look at this very useful resource for looking up colour values: rgb.to RGB coloursĮach of the RGB (red, green, blue) system’s three torches has a setting between 0 and 255.Ī value of 255 means the torch is on and shining at its maximum.
Think of red, green and blue light as special coloured torches