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


Effective Website Design For Massive Traffic

STEP 1:Do your homeworkPlan and think about your content. Think... Read More

What Happened to My Website when I Deleted the Home Page by Mistake?

There is a widespread confusion among lots of new website... Read More

14 Ways to Add Content to Your Web Site - Part 2

7. Create high quality content - make clear points with... Read More

How To Give Your Business Credibility

Let's face it. Buying products and services from the Internet... Read More

Quality Web Copy is the Key to Success

Many websites make the mistake of being all flash and... Read More

Simple Steps To Proper Web Design

Over the course of the last decade, the Internet has... Read More

Why Ugly Sites Sell More Than Pretty Ones

What the heck is going on lately? Most internet websites... Read More

The Newbie?s Guide to Small Business Web Design

You've got a concept for a business, are excited about... Read More

Good Content Pays!

Traffic to a site can be a blessing or a... Read More

Your Website Visitors - Will They Stay?

I'm sure you've all heard the saying 'Build it and... 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

5 Ways To Automate Your Site

Automating your online business is one of the most important... Read More

Alternative to Web Site Templates and Design Software

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

Build Web Pages from the Top Left Corner Down

There are two important reasons to build your website from... Read More

You Too Can Have an Amazing Website

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

Why a Website Design Speaks Volumes About Your Company?

Whether a business has just got off the ground or... Read More

6 Tips To Improve Your Business Website

There are six important characteristics that can play a major... 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

Top 10 Web Design Mistakes

As a webmaster, you want to keep your visitors content... Read More

Copy Editing: 10 Powerful, Mind Blowing Secrets For Writing A High-Impact Ad

No matter what product or service you're promoting, unless you... Read More

Website Design: 10 Smart Tips To Improve Your Ad Copy

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

Color Scheme for Your Website?

Yes, in a world that is obsessed with makeover madness,... 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

5 Ways To Improve Your Website Immediately

If you are reading this, I assume you either have... Read More

10 Things All Webmasters Should Know

Geared Up with a website and lots of energy to... Read More

Effective Website Design

In this era of ultra-sophisticated internet marketing and web design,... Read More

Do You Make These Common (But Deadly) Website Design Mistakes?

Building a website can be overwhelming, here are some design... Read More

How to save money on a website

Know what you wantMake sure you know why you... Read More

An Ideal Home Business Home Page

From my personal experience of around two year as home... Read More

Why You Should Hire a Professional Website Designer

Your web site should always adhere to standards!A professional web... Read More

Looking For A Designer To Re-Design Your Website?

If you were like me and you have just started... Read More

Keep Your Navigation Simple!

Navigation must be simple. Since it's the backbone of your... Read More

Creating Quality Websites

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