HTML and CSS Reference
The two-minute guide to hex codes
The first thing you need to know about hex codes is that they aren't based on 10
digits (0 to 9); they're based on 16 digits (0 to F). Here's how hex digits work:
Using hex, you only ne ed a single
digit t o count all the way from
0 to 1 5. When you get above 9,
you st art using letter s.
So if you see a hex number like B, you know that just means 11. But what does BB,
or E1, or FF mean? Let's disassemble a hex color and see what it actually represents.
In fact, here's how you can do that for any hex color you might encounter.
Separate the hex color into its three components.
Remember that each hex color is made up of a red, green, and blue component.
The first thing you want to do is separate those.
T ake your hex color and
b reak it up into its red,
g reen, and blue comp onents.
CC 66 00