![]() |
|
Using and Converting to Color-Safe PalettesWhen you design web pages in HTML, as you probably know, you can use a tremendous range of colors (over 16 million) for fonts, tables, backgrounds and so forth using the COLOR attribute of the various HTML tags.One thing that many novice webmasters don't think about is whether these colors will be displayed correctly on the screens of visitors who don't have the latest whiz-bang graphics cards. There are still people out there who have graphics cards which are only capable of displaying 256 colors at once. In these cases, the only colors which you can be sure will be displayed correctly are those in the browser-safe color palette. So what happens if your web page includes a color that isn't in the color-safe palette, and a person tries to view on a 256 color screen? Answer: It depends on the user's web browser.
The Solution: Review your HTML coding, and look at the colors in each COLOR= attribute... then change them to their closest color-safe equivalents. (You might want to make a safe copy of your web pages before doing this, in case you make an oopsy). Understanding The COLOR Attribute In HTML Code: If you look at the COLOR= attributes in the HTML code, it usually looks something like this COLOR="#C20F8C" (Sometimes you may also see named colors like "RED" or "MAGENTA" which is beyond the scope of this discussion, just skip over any of those). The values in the quotes after the hash symbol, are actually three pairs of digits, representing the Red, Green, and Blue components of the color expressed as hexadecimal numbers in the range 00 to FF. So for the color given above:
Converting to Color-Safe Colors: Now we understand the theory, we're ready to convert a color to its closest color-safe equivalent. For each of the Red, Green and Blue components, you need to convert them separately into values, you need to convert them separately into the color-safe equivalents, and then recombine the whole lot together. The conversion step goes like this:
If we need to convert C20F8C to its closest color-safe equivalent:
A version of this article is available for free reprint on your web site or opt-in ezine (subject to Terms and Conditions which include also publishing a very brief "About the Author" section which we provide). For information about the terms and conditions, and a copy of the article that you may use: please click here
|
|||||||||||||||||||||||||||||
| Privacy Terms Of Use Copyright © 2005-2008, Answers 2000 Limited With any business, it is up to the individual owner of said business to ensure the success of the business. You may make more or less than any sample figures or results that might be quoted on our web sites or other publications. All business involves risk, and many businesses do not succeed. Further, Answers 2000 Limited does NOT represent that any particular individual or business is typical, or that any results or experiences achieved by any particular individual/business is necessarily typical. In Association With Amazon.com All trademarks are property of their respective owners. All third party content and adverts are copyright of their respective owners. Some graphics on our web sites are Copyright (C) 1997-2000 Hemera Technologies Inc., and used under license. All such pictures are provided for viewing purposes only and are not to be saved or downloaded. All such pictures of recognizable individuals are models and used for illustrative purposes only, and not meant to imply any association or endorsement of said individual with any product or service. |