Skip to content

EuroScope Colour Formatting

Harry Sugden edited this page Oct 23, 2020 · 1 revision

Colours are stored in a 24-bit integer format, where the left most 8 bits are the blue colour, the middle 8 bits are the green colour, and the right most 8 bits are the red colour. To convert individual 8-bit red, green and blue (RGB) values into this format, use the following formula:

(BLUE x 65536) + (GREEN x 256) + RED

To get the RGB 8-bit value for a colour, the "RGB Picker website" website may be useful. Then use the formula above to get the colour code.


Here are some example of colours:

White code = 255*65536+255*256+255 = 16777215

Blue code = 0*65536+0*256+255 = 255

Red code = 255*65536+0*256+0 = 16711680

Green code = 0*65536+255*256+0 = 65280

Grey code = 128*65536+128*256+128 = 8421504