![]() |
Building a better web site ... Questy's, Adding color in HTML |
|
Background Color and Font colors You change the color of the entire document background, as well as text, links, visited links, and active links using attributes of the <BODY> tag. For example, the body tag of this page defines color this way: <BODY TEXT="#000000" BGCOLOR="#CCFFCC" LINK="#993399" VLINK="#339933" ALINK="#339933"> This creates a window with a light green background (CCFFCC), and black text (000000), and purple Hyperlinks (993399). The six-digit number and letter combinations represent colors by giving their RGB (red, green, blue) value. The six digits are actually three two-digit numbers in sequence, representing the amount of red, green, or blue as a hexadecimal value in the range 00-FF. For example, 000000 is black (no color at all), and FFFFFF is white (fully saturated with all three colors). Additive colors are those that when mixed together create white. Red, green, and blue, known as RGB, are additive colors. Additive colors are typically used for computer display. Hexadecimal codes represent the additive colors meaning that it would also represent the color white with maximum values for red, green, and blue. The hexadecimal code for the color white is FFFFFF. Red would be FF0000, Green 00FF00, and Blue 0000FF. The HTML 4.0 Recommendation specifies that the # symbol should be placed in front of hexadecimal color codes when used within HTML. For example, the hexadecimal code for the color red including the # symbol used within the <font> tag would look like <font color="#FF0000">. Browsers like Internet Explorer can display 216 colors without dithering. These 216 colors are known as the browser-safe color palette. Dithering occurs when a computer cannot identify a color, so it approximates a color by mixing colors together from its known colors, called browser-safe colors. Browser-safe colors are guaranteed to render the same across platforms. These 216 colors can be referred to by either RGB values or hexadecimal code. Computers can actually display up to 256 colors known as the system palette, but operating systems like Microsoft Windows reserve 40 colors for its display. When these 40 colors are subtracted from the 256 colors displayed by the system palette, the browser is left with 216 browser-safe colors. Color is one of the most important Web page elements that a designer can use to convey a company's image on its Web site. In the case of the medical Web site, the bright orange color may not send a message of seriousness, which is inherent to such an industry, whereby more subdued colors do such as white, gray, and blue. Keep in mind that color is not perceived the same across cultures. A color that is seen in one culture to be vibrant could have an entirely different connotation to another culture. For more on adding color and images to your web site will be discussed in the graphics section of this course. This link shows the 216 colors are known as the browser-safe color palette. |
|
|
|
![]() |
Welcome
to the World of Questy |