RGB colour notation

About RGB colour notation

RGB colour values are expressed as decimal triplets (yellow = 255, 255, 0) or hexadecimal triplets (green = #00FF00). Computer software is programmed to recognise RGB colour values.

In both cases, the triplets determine the amount of red, green and blue used to produce a specific colour.
A decimal triplet is made up of three numbers between 0 and 255 divided by commas.
A hexadecimal triplet starts with a # sign followed by three two-digit numbers with values between  00 and FF written without spaces between.

RGB colour values are based on decimal notation (triplets with a base 10) or hexadecimal notation (triplets with a base 16).

  • Decimal notation uses 10 digits from 0 to 9 as follows, 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9.
  • The hexadecimal notation uses 16 digits from 0 to F as follows, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.
  • Hexadecimal notation for values between 16 and 31 are as follows 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E and 1F.