Class Reading, Learn Design, Learn Tech Skills


Hexadecimal colors (or hex, for short) are how web browsers describe colors.

Diagram of hexadecimal colors

While you and I might talk about “light red” or “greyish blue,” web browsers have a more specific way of talking about colors.

Every tiny little point on your screen – a pixel – is made up of 3 tiny lights, a red, a blue and a green one. As a result, hexadecimal colors describe how much red, blue and green go into a given color (it’s like mixing paint).

Each hex color code is made up of six digits. For example, black is #000000. The # tells you it’s a hexadecimal color, while the next 6 digits describe how much of each color to use – the first two are for red, the second two for green, the last two for blue. Black has zeroes for everything because it doesn’t have any colors in it!

If you’d like to visualize it, hex colors break down like this:


The larger the numbers, the brighter the colors!

#660000 is a little red all alone, #006600 is just a little green, #000066 is a little blue. #800066 is more red (80 – the first two spots) mixed with some blue (66 – the last two spots), while #336600 is less red (33) mixed with more green (66) and no blue (00).

The interesting thing about hex codes are that instead of counting from 0-99, like you’d expect, they go from 00-FF! They add on A through F after the number 9, so they count like this:

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

Basically, this means something like C3 is a bigger number than 83, and FF is the biggest number of them all. If you’d like to dive deeper, it’s a base 16 number system!

Since FF is as high as we go, #FFFFFF means as much red, green and blue as is possible. That’s white (if you highlight it you can see its hex value)!

#FF0000 is as red as is possible, while #FFA320 is a ton of red, a lot of green, and only a little blue (it’s an orange color). It goes on and on; there are 16.7 million combinations!

Cocktail Party Fact

Even though you’re supposed to always use hex codes to specify colors on the Web, browsers have also memorized a few names, too! You have ones like #FF0000 as Red and #000080 is Navy, but it gets more fun, too: #6495ED is Cornflower Blue, #FF6347 is Tomato and #FF69B4 is Hot Pink!

Now try hexadecimal!
  1. Visit w3 School’s Colorpicker and track down your favorite color’s hex code!