|
|
Colors in HTML - web page color codes and namesOkay, here is the much awaited color session. Colors for HTML pages can be specified by their names or hexadecimal values. The main advantage with color names is that they are easy to remember. The disadvantages are that they are not displayed equally among browsers and you are limited to only 140 colors (since there are only 140 color names!). If you want to specify colors that are browser compatible you have to use their hexadecimal values. Internet Explorer introduced 16 color names, the rest were added by Netscape and adopted by I.E. You can find the entire list of 140 color names along with their hexadecimal codes here. Learning hexadecimal values is not difficult and you'll soon be able to master gremlins like #CC0099. RGB and Hexadecimal Since we are concerned about colors on web pages we shall concentrate on hexadecimal representation. In this notation, we use numbers 0 to 9 and alphabet A to F. Each color in hexadecimal notation takes six digits, where the first two represent RED, the send two, GREEN and the last two BLUE color. Let us look at some examples. FF0000 makes red color. Here the intensity of red is highest (denoted by two Fs), while green and blue have zero values (denoted by two 0s for each color). 00FF00 makes green. Values for red and blue are specified at the minimum (two zeros for each red and blue) and green is at its maximum with two Fs. 0000FF makes blue with red and green at zero (two 00s each) and blue at maximum (two Fs). Get the picture? Here are a few more examples to clear any doubts. FFFF00 Red and Green in full intensity combine to make Yellow. FF00FF Red and Blue make Pink. 00FFFF Green and Blue make Cyan. 990000 A dark shade of red. Remember that any digit below F will darken the color and digits above 0 will lighten it. 006600 Deep Green color, almost like olive green. 00CCFF This is a combination of Green (at CC) and Blue (at FF) to produce a lighter shade of blue. 999999 All colors have been expressed in almost half their intensity. This yields gray. CCCCCC A lighter shade of Grey. So what do you think will be the codes for Black and White? Using hexadecimal color notation as attribute values Experiment with various values till you get a hang of it. Printers use another color palette called the CMYK, Cyan, Magenta, Yellow and Black (represented by K). As a rule, graphics for monitors should be in RGB and for printing should be in CMYK.
Page contents: Colors in html, web page colors, color names and color codes, html colors, hexadecimal color code for web pages
Page URL: http://www.webdevelopersnotes.com/tutorials/adhtml/ colors_in_html_web_page_color_codes_and_names.php3
|
|