The Mudcat Café TM
Thread #11712   Message #88600
Posted By: MudGuard
22-Jun-99 - 02:13 AM
Thread Name: Ignore this - HTML Practice - marquee
Subject: RE: Ignore this
Penny S.,
about the color codes (the numeric ones):
they contain three numbers of two hexadecimal (see below)digits each. The first is the red, the second the green, the third the blue part of the color (also called an RGB value).
The higher the number for a color part, the brighter is the color.
000000 means none of the colors is present, resulting in black.
ffffff means all colors in full brightness = white.
ff0000 is a bright red,
008000 is a dark green,
0000c0 is a medium blue,
ffff00 is bright yellow,
ff8000 is orange
and so on, you just mix red, blue and green (results may vary slightly from screen to screen).


Now for hexadecimal digits:
It is a number system with a base of sixteen instead of the usual 10.
Its digits are presented as
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b ,c, d, e, f
It does not matter whether you use abcdef or ABCDEF
a stands for a value of 10,
b stands for a value of 11,
... f stands for a value of 15.

So if you have a hex (short for hexadecimal) number of a4e, you can translate it into the decimal system like this:
Step 1: take the value of the first digit
Step 2: if no digit is following, you are finished
Step 3: multiply your result by 16
Step 4: add the value of the digit.
Step 5: go to Step 2

With the example of a4e:
Step 1 results in 10 (value of a is 10).
Step 2: not valid, there are 2 more digits (4e)
Step 3 results in 160.
Step 4 results in 164 (value of 4 is 4).
Step 5 leads to step 2.
Step 2: not valid, another digit (e).
Step 3 results in 2624
Step 4 results in 2638 (value of e is 14).
Step 5 leads to step 2.
Step 2 valid, no more digits, we are finished: hex a4e = decimal 2638.
Now here is one for you to exercise: abc1