Prev | Current Page 91 | Next

Charles Wyke-Smith

"Stylin' with CSS: A Designer's Guide 2nd Edition"

You??™d be
hard pressed (to say nothing of your monitor) to discern the difference
between two immediately adjacent hex colors. Don??™t forget the
# (hash) symbol in front of the value.
So, for example, pure red is #FF0000, pure green is #00FF00, and pure
blue is #0000FF.
You can also use the following shorthand hex format
#RGB
If you select a color where each pair has the same two letters, such
as #FF3322 (a strong red), you can abbreviate it to #F32.
Percentages RGB (R%, G% B%). This is notation that uses a percentage
of each color like this
R%, G%, B%
Acceptable values are 0% to 100%. Although this only yields a piddling
one million color combinations (100 ?— 100 ?— 100), that??™s more
than enough for most of us. Also, it??™s much easier to make a guess at
the color you want in RGB compared with hex notation.
So, for example, 100%, 0%, 0% is max red, 0%, 100%, 0% is max
green, and 46%, 76%, 80% is close to that dusky green-blue color I
demonstrated in hex above.
Color Name (red). As you have seen from all the preceding color
examples in the selector discussions, you can simply specify a color
Most hex colors aren??™t easy to guess
at a glance; for example, #7CA9BE is
a dusky green-blue color. But if you
just look at the ?¬? rst value in each
RGB pair, 7, A, and B in this case, then
you can see that red is slightly below
half of 16, the maximum value, and
green and blue are higher and about
the same value.


Pages:
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103