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


How Do We Know When Its Time To Redesign Our Web Site?

A question we frequently get asked is, "how do we... Read More

Why is a Logo so Important to Your Business?

Well, a logo for your business. Why is it important?... Read More

Building Your Website to Save You Money

Does your website make you any money? Does it SAVE... Read More

Bad Design Characteristics For A Website

Making a poorly designed website is one of the easiest... Read More

Marketing Basics for the Webmaster

What is the relationship between Marketing and Web designing? How... Read More

Free Website Templates - Top 10 Things You Need to Know

When building your website you might not have a large... Read More

Do You Own Your Web Site Design?

Your web site has been up for a few months... Read More

Turn Benefits Into Sales with Streaming Media

The "Wow" factor that accompanied the introduction of streaming media... Read More

How to Find Inexpensive Web Design

Web design is a very competitive area and there is... Read More

Web Design - 7 Key Things to Avoid

A search for "web design" on Google returns more than... Read More

Keep Your Navigation Highly Visible

Effective navigation stands out. It's clear, obvious, and highly visible.You'll... Read More

Do You Want To Save Time With Your Web Design?

It starts off simply; a few HTML pages, a few... Read More

Meta Tags ? An Introduction

A long, long time ago? In a galaxy far, far... Read More

How To Create A Stunning Drop Capital Effect On Your Web Pages

Drop Capitals are frequently used in many newspapers, books and... Read More

Successful Websites Don?t Set Out To Sell

What are websites? Are they sales tools for vendors and... Read More

Some Useful Common Site Ideas

In my web surfing adventures, I've found a few site... Read More

How to Choose a Website Design Company

The internet is full of web design companies pleading for... Read More

50 Surefire Web Design Tips

Tips to brand your websiteInclude your logo in all pages.... Read More

Creating Quality Websites

Websites, there are literally billions of them out there in... Read More

Website promotion Ideas: 10 Web Site Add-Ons To Increase Your Traffic

If you're not getting a lot of traffic to your... Read More

Give Your Web Site a Small Business Marketing Tune Up

Your web site is like your car. Both are significant... Read More

10 Nifty Ways to Prolong Your Visitors at Your Website

Increasing the length of time a visitor is on your... Read More

6 Reasons Why A Website Is Crucial To Your Business

Since I'm a web designer, I have a tendency to... Read More

Website Design: 10 Smart Tips To Improve Your Ad Copy

Your website design may be affecting your sales in ways... Read More

Why Your Site Should be Developed with CSS and Semantic Markup

Why your site should be developed with CSS and semantic... Read More

Let Your Website Make You $$$ While You Sleep! and All That Other B.S.!

Well, you've got your product, started your home business, and... Read More

How to Convince Your Visitors to Return Often

One visit does not make a sale. Be sure to... Read More

How to Prepare Your Project Before You Order Website Design

Are you serious about get this website done fast and... Read More

Website Design Considerations

Q: Should I build and maintain my business Web site... Read More

Free Web Design Advice

In this article I will give advice and tips of... Read More

Every Website is a Human Being?s Attempt at Achieving a Goal or Obtaining Happiness

Have you ever thought about the real stories behind all... Read More

Web Designing Tips

Easy That's how you'd like life to be, right? Especially... Read More

10 Ways Web Site Text Can Impact Your Readers Buying Decision

10 Ways Web Site Text Can Impact Your Reader's Buying... Read More