previous |
index
| next
Color can be used to add an extra dimension to the content of a page,
but selection of colors on web pages goes a little further than just the
aspect of design. Not everyone viewing a page has the same hardware, and
therefore the number of colors may be limited. This has to be taken into
account when using colors in web pages.
Note that setting colors is merely an advice to the browser, and may
be ignored or interpreted rather liberally, upto the point that different
colors are actually selected. This may even happen on this page!
Describing colors unambiguously is done as follows. The color model used
in HTML is RGB, for red-green-blue, and can take values of 0 - 255
for each of these. The tricky part is that these values aren't written in
decimal, but hexadecimal, which is a numeric system with base 16. Since arabic
numbers only allow 10 different values, the letters A-F are added to these. So
counting in hexadecimal goes
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11, ...
Values from 0-255 decimal can be expressed in two digits hexadecimal:
00-FF. In HTML, a color is specified as #RRGGBB, in which the
RR, GG, and BB specify the red, green and blue
values. Examples:
#000000 | | black |
#FF0000 | | red |
#00FF00 | | green |
#0000FF | | blue |
#FFFFFF | | white |
previous |
index
| next
I
will not guarantee that any of these pages will exist indefinately, so please
only bookmark the top page.
|
|