![]() |
![]() |
Web Design Information |
|
![]() |
![]() |
Hexadecimal Color Notation on the WebStephen Bucaro When designing elements for your webpage, you will often be called upon to specify a color. For example, the code for a span shown below specifies that the color of the text within the span will be yellow. <span style="color:yellow;">Text</span> Colors can be specified according to their names, for example "yellow", "green", or "blue". In many cases, these simple color names will work. But what if you want to specify a more sophisticated color like "cornflowerblue" A particular browser may not recognize a particular color name. Its more reliable to specify colors with an "RGB triplet". An RGB triplet specifies a color based upon the amounts of red, green, and blue, on a scale from 0 to 255, required to create the color. For example, to create the color cornflowerblue you need red=100, green=149, and blue=237. We could then specify the color of the text within a span using the rgb function as shown below. <span style="color:rgb100,149,237;">Text</span> This will work fine with style notation, but what if you want to use straight html. Html doesnt recognize the rgb function. In that case, you can specify color using "hexadecimal" notation. Whereas the decimal numbering system uses the characters 0 through 9 to get 10 values, the hexadecimal numbering system uses the characters 0 through f to get 16 values. After 9 the characters a, b, c, d, e and f are used, as shown below. Decimal Hexidecimal Equivilants dec hex 0 = 0 1 = 1 2 = 2 3 = 3 4 = 4 5 = 5 6 = 6 7 = 7 8 = 8 9 = 9 10 = A 11 = B 12 = C 13 = D 14 = E 15 = F On first appearance, this looks pretty simple but you need two hexadecimal characters to represent all decimal values from 0 to 255. When you increment decimal 9 by 1, you change the 9 to 0 and put 1 in the tens place. When you increment hexidecimal F by one, you change the F to 0 and put 1 in the "sixteens" place. Sometimes its not easy to convert between decimal and hexadecimal in your head. RGB Triplet for Cornflowerblue color dec hex red 100 64 green 149 95 blue 237 ED We could then specify the color of text within a span using the hexadecimal notation as shown below. <span style="color:#6495ed;">Text</span> Note that when we indicate the use of hexadecimal notation by placing a pound # sign in front of the number, and we dont use commas to separate the color components. If its not easy to convert between decimal and hexadecimal in your head, then how do you do it You can use a calculator that has a decimal to hexadecimal coversion function, or you can learn to think in hexadecimal. For example, whats the next number after CE That would be CF. whats the next number after CF That would be D0. Which hexadecimal number is higher 99 or B2 B2 would be higher than 99. It gets easier with experience. Heres Java Script code for a simple decimal to hexidecimal color converter function convertdecvalue { var num = parseIntdecvalue; ifnum >= 0 && num < 256 { var hexnum = num.toString16; alert"#" + hexnum; } else {alert"Error!";} } Its important to use hexadecimal notation to specify colors when you use DHTML with visual effects, because to create a dynamic color change you have to increment or add a value to a color. The vast amount of color specification on webpages is in hexadecimal notation, so it would be wise to become familiar with it. CopyrightC Bucaro TecHelp. Permission is granted for the below article to forward, reprint, distribute, use for ezine, newsletter, website, offer as free bonus or part of a product for sale as long as no changes are made and the byline, copyright, and the resource box below is included.
| ![]() | ![]() | ![]() | RELATED ARTICLES Enhance Your Website With A Yahoo-Style Directory Does your website have a links/resources page Learn the Language of the World Wide Web If you are already on the web or thinking about it then you must know the terminology used on the web. Here is a Glossary of a few must know Web Terms. Color Psychology for webpages Colour is an aspect of a website that is often picked haphazardly and without any thought from a beginner web designer. The lesser known quality of the colour of a website is that it can greatly affect the mood of your visitors. It is because of this that a websites colours need to be picked carefully. 5 Tips For the Perfect Domain Name What is a domain name A domain name is the location of your website on the Internet. Your domain name will be what you become known by online so its important to get it right. The Secret Benefit Of Accessibility Part 2: A Higher Search Engine Ranking An additional benefit of website accessibility is an improved performance in search engines. The more accessible it is to search engines, the more accurately they can predict what the sites about, and the higher your site will appear in the rankings. How To Get Repeat Visitors To Your Site When you have a website online it is important for you to try and get new visitors to your site, but it’s also important to take care of the visitors that you actually already have. This is because you will want your existing visitors to keep returning to your site again and again. CSS - Maximum Benefits What is CSS Dreamweaver vs FrontPage There are two major WYSIWYGWhat You See Is What You Get editors available for beginners. These are: Microsoft FrontPage and Macromedia Dreamweaver. So the question is which one is better Beautiful Web Sites Seldom Make More Sales Designing an E-commerce Web site is not as simple as having a "pretty" site that is a pleasure to visit. While it is important to have an attractive site, as much thought must be given to functionality as to appearance. Blogging for Profits Bloging the act of writing to a blog has become one of the fastest growing trends this year and many internet gurus believe that this is the new biggest trend.Well, you might ask yourself what is the big deal I dont even know what a blog is Some Basic Tests To Check Your Website For Accessibility The Disability Discrimination Act says that websites must be made accessible to disabled people. So how can you check that your website is up to par There are a number of basic tests you can make to address some of the main issues. Webcredible http://www.webcredible.co.uk, a web accessibility and usability consultant, suggest a number of guidelines that provide a good start in increasing accessibility to your site visitors: The Reality of Successful Web Site Today For a number of reasons, the analysis of customers feedback is too often given little attention. Still, people who ignore research are as dangerous as generals who ignore decodes of enemy signals c David Ogilvy. Its an inexcusable omission for those, who strive for having a successful web site. There are dozens of ways to receive feedback and unlimited ideas for your customer service improvement in it. But you cant afford phone everybody from your CRM list or correspond with each customer via email or regular mail. It will flatter them but bother you. Fortunately there is such a magic tool as web-based forms, which allow site owners to automate the process and to use the received data in your analysis; the analysis, aimed at your web site usability optimizing. Making Your Website Work for You: Attracting Visitors Just building a website is not enough. You need to get people to visit it. And just submitting to the search engines won’t do much.Here is a brief overview of 3 effective strategies to get people to your website: 1Search Engines, 2 PR and Marketing and 3 Email Newsletters. Here is a quick list of do’s and don’ts for each: Tips For An Effective Website A successful website is something that everyone venturing into the new arena of Internet marketing and communications wants to have. Your website will often be a potential client’s first impression of you and your business. That being said, it is vitally important that your website represent you in a favorable manner. Your website is a component of your overall marketing strategy and should be reflective of your business and current marketing presentation. Just as your brochures and other print materials represent a level of quality and professionalism, your website should also represent that same level of quality and professionalism. As a point of comparison, you most likely wouldn’t have just anyone design your company’s marketing materials or for that matter, prepare your tax statements. Similarly, it is important that the person creating your website know how to effectively communicate both your message and style, and be able to create an effective experience for those visiting your site. Web Accessibility Myths With more and more countries around the world passing laws about blind and disabled access to the Internet including the Disability Discrimination Act in the UK, web accessibility has been thrown into the spotlight of the online community. This article attempt to put a stop to the misinformation that has been thrown around and tell you the truth behind web accessibility. The Top 5 Roadblocks To Web Accessibility Introduction Effective Web Design D.zigns dzignerwebs Opinion – Search Engine Success This article is actually the summary to a book soon to be released by the author, titled “Guaranteed Website Success”. Opinions are quite often controversial. Such is the nature of this one. Autoresponder Tips An autoresponder is useful for, well, responding to people who send you inquiries through email. They are actually more than just merely useful - they are an essential tool in any webmasters toolbox. Used properly, they can enhance your visitors experience and virtually guarantee that they will come back time after time. Used improperly, they annoy people and push them away from ever coming back. Common Website Mistakes Is your website ailing ![]() |
home | site map |
© 2005 |