Do you use some tool like Photoshop or an online color picker to choose your HTML colors? We use things like #ffffcc and #454545, who knows what these are and what they are doing here eh? Well as you will see hexadecimal is not that complicated at all, let’s take a look.
I bet many more of you know RGB notation, since the name says it all, Red, Green, Blue. The three numbers in an RGB value (ranging from 0 - 255) represent the intensity of these three colors, with 255 being the most intense. For example, (0, 0, 255) would be as blue as it gets, since red and green values are set to 0, while blue is set to 255.
Actually hexadecimal notation is exactly the same, with different ranges. If you group a hex value the same way as you do with RGB, for example #00 00 ff, you would get the same result as with the RGB(0, 0, 255). As you can see, hex ranges from 0 to f, with f being the most intense.
endif; ?>Knowing how these colors work enable you to change colors quickly on your website because you will roughly know what it will look like. If you want to get the exact same blue but in a lighter shade, you know you need to bump up all other values as well (to get it closer to white), for example #4455ff will be a lighter shade of blue.
As a side note, you can actually obtain the number of colors that your system can display with this information. Color values can go from 0 - 255, that means 256 colors overall for one channel. If you want all the combination of colors, use a bit of math and you will come up with 256 x 256 x 256 = 16, 777,212.