When you are looking at the source for pages around the Web, you may see cryptic six-digit codes in place of color names.
These are actually numbers written in base 16, or hexadecimal. Without going too far into the math, there are a few things to know:
Note that when using hexadecimal colors, you should include a pound sign (
These are actually numbers written in base 16, or hexadecimal. Without going too far into the math, there are a few things to know:
- Counting in base 16 goes like this: 0123456789ABCDEF. What??
Well, "9" means nine, "A" means ten, "B" means eleven, and so forth. So F is the highest digit you can use in hexadecimal, and it's worth fifteen. - Colors represented in hexadecimal are numbers with six digits. The first two are for red, the next two are for green, the last two are for blue. Shorthand: RRGGBB.
- The higher the number, the brighter the pixel on the screen. So 0 is the lowest setting (black) and F is the brightest setting.
Note that when using hexadecimal colors, you should include a pound sign (
#
) before the hexadecimal number.
Make the paragraph into blue text by adjusting the hexadecimal color attribute.
Leave your comment