As you’ve seen, one
way to add a splash of color to the black, gray, and white on your web pages is
to ad images. However, several HTML attributes enable you to change the colors
of the page itself, including changing the background color, changing the color
of the text and links, and adding spot color to individual characters.
In this section, you’ll learn how to make all these changes in
HTML 3.2.however,as is the case with most of the presentational attributes we’ve
covered thus far, color attributes are deprecated in HTML 4.01 in favor of
style sheets. You’ll learn more about the style sheet approach in lesson 9.
SPECIFYING COLORS
Before you can change the color of any part of an HTML page,
you have to know what color you’re going to change it to. You can specify
colors using the color extensions to HTML in two ways:
·
Using a hexadecimal number representing that
color
·
Using one of set of predefined color names.
The most flexible and widely supported method of specifying
a color is to use the numeric identifier. Most image – editing programs have
what’s called a color picker – a tool for choosing a single color from a range
of available colors. Some color pickers display the value of that color in RGB
form as three numbers representing the intensity of red, green, and blue in
that color, Each number is usually 0 to 255, with 0 0 0 being black and 255 255
255 being white. If you use one of these tools, you’ll have to convert the
decimal numbers to hexadecimal. These days, most tools with color bickers also
provide the hexadecimal values for red, green, and blue, which is what web
browsers require. In fact, the color picker that’s built into the Mac OS
includes the hexadecimal values to make things easy on web publishers.
The final hex number you need is all three numbers put
together with a hash sign (#) at the beginning, as in the following.
#000000
#deo4e4
#ffff00
Netscape and internet explorer support a much easier way of indicating
colors. Rather than using arcane numbering schemes, you just choose a color
name such as Black, white, Green, Maroon, Olive, navy, purpled, gray, red,
yellow, blue, teal, lime, aqua, fuchsia, or silver.
Although color names are easier to figure out and remember
than the numbers, yonlya few colors have names that are well supported by web browsers.
After you have a color name or number in hand, you can apply that color to various
parts of your HTML page.
There are also a number of websites that are designed to
help web designers choose colors. One of the best is color scheme at http://www.colorschemer. Com/onlin.html.
it enables you to view several colors next to each other to see how they match,
and will even suggest colors than match the ones you choose. The current color scheme
interface appears in Figure 7.29.
FIGURE 7.29 color
schemer.
No comments:
Post a Comment