|
|
|
Appendix B
Colors in Hex
Html 4 lets you make use of over 16 million colors. To access these colors, you need to specify their red green and blue components: color="#rrggbb" . Where rr is any number between 0 and 255, gg is any number between 0 and 255 and bb is any number between 0 and 255. Do 'nt forget the #. Now, as the name says, these colors are in hex! Hex is short for the Hexadecimal system.
|
Each color component is given a
number between 00 - ff (0 - 255)
|
Counting in hex
Counting in the hexadecimal system is easy! Here is a quick lesson.
We use the 'base 10' system for counting. Basically we count in groups of 10. In the hexadecimal system we would count in groups of 16! So what do we use for the last 6 numbers? We use the letters a through to f. I will now count out 16 numbers using both methods.
Base 10
00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, 12, 13, 14, 15.
Base 16
00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0a, 0b, 0c, 0d, 0e, 0f.
In base 10 , the left digit tells us how many groups of 10. And the right tells us how many units we have. In base sixteen the left digit tells us how many groups of 16 we have. Therefore in 'aa' the first 'a' would mean 10 groups of 16 and the second 'a'(just like an 'a' by itself) would be 10. So 'aa' = 160 + 10. Read this paragraph a few times and look at the tables above and below and i'm sure it will become clear. To make it easy here is a list of our numbers hexadecimal equivalents. 0 - 255 . The numbers in the light grey rows are the numbers we use and know of so well. The numbers in the dark grey rows represent the numbers hexadecimal version.
Hexadecimal equivalents
Some of the possibilities
The lower the number the darker it is.
|
|
|
|
|
|
|
|
|
|
#ffc6a5 |
#ff9473 |
#ff6342 |
#ff3118 |
#ff0000 |
#d60000 |
#ad0000 |
#840000 |
#630000 |
|
|
|
|
|
|
|
|
|
#c6e7de |
#94d6ce |
#63bdb5 |
#31ada5 |
#089494 |
#087b7b |
#006363 |
#004a4a |
#003139 |
|
|
|
|
|
|
|
|
|
#ffffff |
#e0e0e0 |
#bfbfbf |
#a1a1a1 |
#808080 |
#616161 |
#404040 |
#212121 |
#000000 |
|
|
|