Site hosted by Angelfire.com: Build your free website today!

MATHEMATICAL COLOR

It turns out that it's very convenient to use numbers to describe colors while programming in HTML. There are a lot of colors available (16,777,215 theoretically) and every color has a number. The numbering system is very logical and easy to use once you understand it. Here are some clues to give you a feel for it.


Let's all count together (100 numbers)
00  01  02  03  04  05  06  07  08  09
10  11  12  13  14  15  16  17  18  19
...
90  91  92  93  94  95  96  97  98  99

Now, let's count in computer (hexadecimal- 256 numbers)
00  01  02  03  04  05  06  07  08  09  0a  0b  0c  0d  0e  0f
10  11  12  13  14  15  16  17  18  19  1a  1b  1c  1d  1e  1f
...
f0  f1  f2  f3  f4  f5  f6  f7  f8  f9  fa  fb  fc  fd  fe  ff
Let's check out some color numbers
#ff0000 #bf0000 #7f0000 #3f0000 #ffff00 #bfff00 #7fff00 #3fff00 #ffbf00 #bfbf00 #7fbf00 #3fbf00 #ff7f00 #bf7f00 #7f7f00 #3f7f00 #ff3f00 #bf3f00 #7f3f00 #3f3f00 #ff00ff #bf00ff #7f00ff #3f00ff #ff00bf #bf00bf #7f00bf #3f00bf #ff007f #bf007f #7f007f #3f007f #ff003f #bf003f #7f003f #3f003f

You might have noticed something by now (or maybe not)

More clues: #ff0000 (all red) #00ff00 (all green) #0000ff (all blue) #ffff00 (yellow) #ff00ff (violet) #00ffff (turquoise)

What if we have all f's? #ffffff

What if we have all 0's? #000000

Final clue: The background color number of this screen is #7f7f7f