Nutrocker
ezboard Moderator
ezSupporter
Posts: 58
|
Posted: 10/11/01 1:57 pm
(HTML Tip) Color Codes
Color codes confusing you?
Here's an explanation of the color codes...
The basic makeup of an HTML color code (or "hex code") is RRGGBB. Two hexadecimal digits for each color of red, green, and blue.
Hexadecimal uses digits 0-F (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A(10), B(11), C(12), D(13), E(14), F(15))
1 + F = 10 in hexadecimal, that's a value of 16 in decimal.
The exact color you want can be found using this, just try to find the best combination of the three colors. The highest number you can use is 255 for each color, represented by FF.
You convert to hex by dividing the number (in decimal) by 16, to get the first digit (after you convert it to hex) and then find the remainder to get the second digit.
For example, if you wanted 136 out of a strength of 255 red, 180 out of a strength of 255 green, and 50 out of a strength of 255 blue, you would do this:
136/16 = 8, R 8. That's 88 in hex for red.
180/16 = 11, R 4. That's B4 in hex for green.
50/16 = 3, R 2. That's 32 in hex for blue.
Making the RGB code 88B432.
Some common hex codes:
000000 = black
FF0000 = red
00FF00 = bright green
0000FF = blue
FFFF00 = yellow
FF00FF = dark purple
FFFFFF = white
By DxJeRiChO
Edited by: atlass at: 12/15/01 3:56:11 am
|