HTML Color Codes

By

Saqib Ansari

Posted Date: Friday, December 08, 2006 | Viewed: 204
Posted In Category: Article Directory > Computers and Internet > Web & Ecommerce Articles
Web & Ecommerce RSS Feed | Email to Friend | Report Article | Post A Comment


HTML Color Codes are 6 characters wide and look like "#80FF12". This is really made up of 3 2-digit hex numbers that represent Red, Green, and Blue. I probably just lost a good portion of the readers, didn't I? Let me back up and explain some things about hex values and color.

How to describe a color using numbers? There are a lot of ways to specify a particular color, but one of the ways that's used with computers is to specify the values of Red, Green, and Blue to mix together to achieve the desired color. As we vary the amounts of Red, Green, and Blue we can create most any color you desire.

Why does this relate to computers? Computer displays, TVs, LCDs, and other "projected light" display devices use pixels to display what you see on the screen. The color value for those pixels is specified in a RGB (Red, Green, and Blue) value. For example, if your PC monitor is set to 1024 x 768 resolution, then there are 768 lines (going across your screen from top to bottom) on your screen, each line has 1024 pixels or little dots in it. Each of those pixels or little dots is actually made up of three smaller dots or light sources: a red one, a green one, and a blue one.

Ink is different. Printers that you use with your computer generally specify color as a four (or more) color "reflective" ink value made up of Yellow, Magenta, Cyan, and Black which is abbreviated as YMCK. Your computer uses formulas to convert the RGB values to CMYK values so that you can print what you see on your screen accurately.

How does the computer represent a RGB color value? As 3 separate values (one for Red, one for Green, and one for Blue) and each one ranges between 0 and 255. If you count the 0 as a value, that's a total of 256 possible values. When you put the Red, Green, and Blue values together to represent a color, you get a possibility of 16.7 million colors (256 x 256 x 256). That's a lot of colors and most people consider this to be "true" color because it can represent most photographs and images.

OK then, what is a Hex value? I'm glad you asked! Your computer stores information as single ones and zeros. Each of these tiny single values is called a "bit". We then combine 8 of these "bits" to make a "byte". So a byte is 8 bits. If you recall from high school math, you can count in various "bases". We normally use base 10 or "decimal", which uses 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 to represent a number. Likewise, if we use the ones and zeros I just mentioned, we're talking about just two possible values for each digit, 0 or 1, and this is called base 2 or "binary". However, in computers, we also use base 16, or hexadecimal (hex for short) because it packs more values into a single space. Hex uses the following digits to represent a number: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. To represent the number 128 in decimal or base 10 takes 3 digits (128), in binary it takes 8 digits (10000000), and in hex or base 16 it takes just 2 digits (80). So by using hex values we save storage space and gain efficiency.




Comments on HTML Color Codes :
Post A Comment on HTML Color Codes
    No Comment Posted Yet...

Related Articles on Web & Ecommerce

  1. Introduction to Electronic Commerce by Saqib Ansari
    Over the past two decades, businesses in virtually every sector of the world economy have bene®ted f...
  2. Electronic markets by Saqib Ansari
    At the center of commerce is the market. In one way or another, markets have been automating since T...
  3. Key Words Selection by Saqib Ansari
    The search engines like Google,Yahoo and MSN are the vehicles that drive potential customers to your...
  4. What is Search engine optimization(SEO) by Ariese Ansari
    Search engine optimization (SEO) as a subset of search engine marketing seeks to improve the number ...
  5. Generate Ad Revenue With Your Website by Charlie Douglous
    If you have a website that provides free information or a free service, you may be sitting on a pote...
  6. What is e-commerce - Advantages and Drawbacks! by William King
    This article narrates the facts about electronic business, the business over the internet. It throws...
  7. How to Sell Effectively on eBay - Top 10 Tips by William King
    This article lists out some tips and suggestions that will help in selling your products effectively...
  8. Finding “Dropshippers and Wholesalers” made easy through online directories by William King
    The purpose of this article is to assist readers in locating various wholesalers and dropshippers wi...
  9. The advantages of working online as compared to offline by William King
    This article will delve into the benefits of running an online business as opposed to an offline one...
  10. International business to business payments by William King
    This article focuses on methods of international business to business payments and which methods are...
  11. Planning and starting an online business by William King
    This article takes you through the process and planning required in starting your own online busines...
  12. Web marketing VS Offline Marketing by William King
    This article focuses on the difference between web marketing and offline marketing, highlighting the...
  13. Who uses eBay and Why by William King
    This article offers information on the typical types of users of eBay and the reasons for their doin...
  14. Communication channels & their importance in online business by William King
    This article lists the communication channels that an online business must utilize and the importanc...
  15. Finding trustworthy buyers and sellers in online trade by William King
    This article offers tips on how to find trustworthy buyers and reliable sellers while operating a bu...
  16. Is Selling Online A Smart Decision? by Monica Lorica
    The internet is often deemed as the perfect place to sell products and services. It can reach a wide...
  17. Threats to online Trading Companies from fraud and hackers by William King
    This article focuses on the threats that online businesses face from hackers and the risk of fraud....
  18. Infrastructure for electronic business on the internet by William King
    You can make huge money selling online, if you get the basics right. So let us try to understand the...
  19. Selling your products online! How to sell effectively using a website by William King
    This article throws light on understanding the characteristics of a successful e-commerce site to ge...
  20. Buy & Sell of Used Items on the Internet in India by Aasit
    YObaba.com is a free online local classifieds for property, cars, jobs, services, community, events ...

Related topics in Computers and Internet



Other Categories