What is: Hexadecimal Colors?

websafe colours, web palette

The websafe palette consists of 216 colours that when displayed on a 256-colour (8 bit) monitor will be displayed as continuous flat colours.


These colours will be rendered as flat colours on both Windows and Macintosh platforms – as to hue and saturation, well…


Hexadecimal system (base 16)



When defining colours in CSS, hexadecimal codes may be abbreviated to a single-digit for each of the 2-digit pairs; e.g. #FF0033 may be abbreviated to #F03.


The hexadecimal counting system consists of 16 unique symbols;


  • numbers from 0-9
  • letters from A-F


Counting in hexadecimal: 0 1 2 3 4 5 6 7 8 9 A B C D E F, where 0 is null and F is the highest value.



Specifying websafe colours (using hexadecimal notation)


Colours in HTML are specified by a hash (#) followed by a six-digit hexadecimal number. This number consists of three 2-digit numbers corresponding to red, green and blue (RGB) values.


#XXxxxx = red
#xxXXxx = green
#xxxxXX = blue


The websafe (216 colour) palette consists of a subset of the possible hexadecimal combinations and is restricted to three pairs of the same value at 20% increments, i.e.:


00 33 66 99 CC FF



#000000 = black
#FF0000 = 100% red
#00FF00 = 100% green
#0000FF = 100% blue
#FFFFFF = white