What is Hexadecimal colour?

What is Hexadecimal colour?

The Hexadecimal, or HEX colour system, was developed for creating colours in HTML (HyperText Markup Language) for websites. It’s another way of describing RGB colour values – with a single number.

Hexadecimal is a base-16 number system (hex means 6, and decimal means 10), which allows us to represent larger numbers with fewer digits.

It uses the numbers 0 to 9 and the letters A to F to describe RGB value colours:

0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
.
.

 

This is an example of a HEX colour
(the hash symbol ‘#’ denotes a HEX colour in HTML code):

#E86F1F

  • E8 is the Red value
  • 6F is the Green value
  • 1F is the Blue value
Here’s a swatch of the colour:

 

Note that the highest value is Red (E8 is a high number), the second highest is Green, and the last is Blue – which produces this particular shade of orange.

The same colour in RGB would have the following values:

#E86F1F =  RGB(232, 111, 31)

The HEX value is a more efficient way of representing RGB colour information.

This colour picker tool (Figure 3.22) shows RGB and HSV values, and the Hexadecimal colour value (HTML notation).

GIMP colour picker
Figure 3.22. Colour Picker showing various RGB colour values. Image attribution: Colour picker image from GIMP image manipulation software applicationGNU public licence v.3

 

White in HEX colour is #FFFFFF – the highest number – and black is #000000 – the lowest number.

If you convert #FFFFFF from a hexadecimal to a decimal number, you get the number 16,777,215 – which is the exact number of colours that can be displayed on 24-bit computer displays.

If you want to test your HEX colour identification skills, you can try this online guessing game – WHAT THE HEX?  – It’s fun and can be addictive!

License

Icon for the Creative Commons Attribution-NonCommercial 4.0 International License

Colour Theory: Understanding and Working with Colour Copyright © 2023 by RMIT University is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License, except where otherwise noted.

Share This Book