Understanding How HTML Color Codes Work

Ever wonder how HTML color codes are put together? For the beginner, it can look like lots of numbers and letters that make no sense. In reality, HTML color codes are written that way for a specific reason that we'll look at in this article.

Introduction to the Hexadecimal System

In mathematics, the hexadecimal or simply hex is a numeral system with a base of 16 usually written using the symbols 0-9 and A-F. The numbers 0-9 have the same value as in the decimal system but starting with the letter A, the value keeps going up one up to the value of 16. A is worth 10, B is worth 11 and so forth until you get to F which is worth 16.

How the HTML Color Codes are put together

HTML Color codes are composed of six hex numbers that represent a possible 16.7 million color combinations. The hex color codes are built on the RGB color model. R stands for red, G for green, and B for blue. With your typical html code that looks like this: #FFFFFF it breaks down as follows. The first two hex digits #FFFFFF represent 'red'. The second set of two hex digits #FFFFFF represent the color green. The third and final set of two hex digits #FFFFFF represent the color blue.

A brief overview of the RGB model

The RGB color model, like the HTML color model can represent a total of 16.7 million colors. By varying the amoung of red, green, and blue, one can come up with any of 16.7 million colors. Each RGB value is represented by a number from 0 to 255. So a set of RGB values for the color white for instance, would look like this: 255, 255, 255.

Putting HTML and RGB Together

We've already established the hex numeral system with it's number range between 0 to 16. Now, when you combine two hex numbers, you can represent any number between 0 and 255. As you can see, RGB and HTML color codes represent the same color model.

Websafe Color Palette

Years ago, monitors could only display 256 colors. These monitors were still popular when HTML was first put together. As such, it was necessary to put together a list of colors that web designers could be sure any given monitor could properly display. Web safe colors are the result. The websafe color palette is made up of 216 colors.

It is always good practice to pick standard colors across the board, but it is no longer absolutely necessary to stick with web safe colors. Doing so now is more for purposes of holding to standard than it is for necessity. One exception to this rule may be developing websites for cellphones and PDA's. Having said that, these devices are now surpassing this barrier as well.

#FFFFFF represents the color white. #000000 represents the color black with every other color in between. I hope you now have a much better idea of why HTML color codes are look the way they do.

Joe Duchesne is the president of Yowling.com. They specializes in business web hosting and also offers you the ability to design a website online using their easy to use ecommerce website builder. Reprint freely as long as you provide a keyword rich clickable link back to our website.

In The News:


pen paper and inkwell


cat break through


7 Tips To Increase Sales With Your Ecommerce Web Site

Ecommerce is just exploding right now on the Net. More... Read More

Some File Naming Tricks for Your Online Home Based Business Web Pages

Conventional Wisdom states you should use Sub-Directories to organize your... Read More

Shameless Flashers - Using Flash Tools To Create Spectacular Websites

Flash is a powerful technology that can help you create... Read More

What I Look For In a Website

As my occupation is that of a proofreader, one of... Read More

How to Make a Website (Minus the Headaches)

There is nothing wrong with making your own website if... Read More

How to Build Your Own Website - More Steps

To build a website, there are four methods to choose... Read More

Flash Design Adds Website Versatility

You have probably viewed many Flash-based components while surfing the... Read More

Web Designers Beware!

As a web designer, I have a personal interest in... Read More

A Web Site That Sells Is All One Needs To Have A Successful Online Business!

There are more than billions of Web Sites, running Online... Read More

4 Things That Make A Web Site Great

First you need original content. Content is the heart beat... Read More

9 Ways to Gain Your Visitors Respect

The internet is filled with sites and they are good... Read More

Designing Professional Web Pages

If your Web site doesn't project a professional and polished... Read More

Seven Habits of Highly Effective Webmasters

A highly effective website will always reflect its highly effective... Read More

Be Friendly to Search Engines

The object of search engines is to give their visitors... Read More

Quality of Your Text Layout and Design

Why is the quality of your text layout and design... Read More

7 Ways of Building Customers Trust With Your Web Site

When I purchase something from a web site I first... Read More

To Hire or Not to Hire a Website Designer

In the early years of the internet the actual design... Read More

Get Rid of Your Frames

A few years ago a lot of websites utilized frame... Read More

Should You Bother Learning HTML to Build Webpages?

The most popular method to build webpages today is to... Read More

Alternative to Web Site Templates and Design Software

Before I discovered the concept of Web site templates, I... Read More

How to Make Your Site Attractive to Potential Link Partners

Every now and then, I receive a link exchange request... Read More

Website Creativity: Why It Matters Now More than Ever

If one more business owner tells me their website sucks... Read More

Keep It Simple, Stupid: The Beauty of a Clean Cut Website

Don't knock it; "Keep It Simple, Stupid" is a great... Read More

Are You A Bill Clinton Webmaster?

One of the most frequent questions I get asked about... Read More

Browser Compatibility

Internet Explorer, created by microsoft has been the most popular... Read More

Has Your Design Firm Run Amuck With Your Web Site?

What's happening to good web site design? Somehow we creative... Read More

You Too Can Have an Amazing Website

It is a well-known fact that a successful business depends... Read More

Flash - To Use Or Not To Use?

Out there in the WWW there are thousands sites using... Read More

Power of Squeeze Pages for Realtors

Squeeze pages are a very hot topic in the internet... Read More

Pop-Ups Still Work. At Least For The Time Being

Do you remember playing with the jack-in-the-box toy as a... Read More

TEN Answers That Turn Your Visitors Into Your Customers

You know... Before purchasing your product a person comes to... Read More

Using Your Personal Website To Clinch That Job!

With an increasing number of employment portals emerging, it is... Read More

Affordable Web Design In Birmingham

If you have a business, big or small you may... Read More