logo
g Text Version
Auto
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Society & Culture
Sports
Travel & Leisure
TV & Movies

dailyclick
Bored? Games!
Postcards
Astrology
Take a Quiz
Rate My Photo

new
Journals
Folklore and Mythology
Business Coach
Marriage
Senior Living
Ethnic Beauty
Adolescence


dailyclick
All times in EST

Full Schedule
g
g HTML Site
Elizabeth Connick
BellaOnline's HTML Editor

g

How to Use Web Colors

Matching your website's color to, say, your chosen banner image can make a big difference in the site's appearance. If your colors don't quite match it can have a pretty jarring effect on viewers. So how do you make sure that the colors are right – and that they stay right for all of your visitors?

You can use HTML and CSS to define your colors using hexadecimal codes. Hexadecimal is a base 16 numbering system. What does that mean? Well, everyday numbers are set in base 10, which means that to count to ten we use the numbers one through nine and then 10. Computers use base two, which mean your computer counts through the following sequence: 1, 2, 10, 11, 12, 100… it only uses the digits zero, one and two to express a number. Base 16 is the opposite; it uses more digits than base 10, so the numbers above nine are represented with the letters a through f. So counting to ten in a hexadecimal sequence is: 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f, 10!

Fortunately you don't have to get familiar with base 16 to use hexadecimal color codes. A hexadecimal color code, or web color code, uses a six-digit "number" to describe a specific shade to your computer. The codes run from #000000 (black) to #ffffff (white).

During the early days of web design, we were cautioned to stick to the 256 "web-safe" colors that would display accurately on all monitors. Nowadays monitors are capable of distinguishing between 16 million different shades, so you can use pretty much any color you can imagine.

To set a background color with hexadecimal code in CSS, use the following format (this one happens to be a dark blue shade):

background-color: #003366;

If you want to avoid hexadecimal format altogether you can always stick to the 16 "named" colors; for your reference, the complete list is below.









ColorHex CodeColorHex CodeColorHex CodeColorHex Code
aqua#00FFFF gray#808080navy#000080silver #C0C0C0
black#000000green #008000olive#808000teal#008080
blue#0000FFlime#00FF00purple#800080white #FFFFFF
fuchsia#FF00FFmaroon#800000red #FF0000yellow #FFFF00

RSS | Related Articles | Previous Features | Site Map

Add How+to+Use+Web+Colors to Twitter Add How+to+Use+Web+Colors to Facebook Add How+to+Use+Web+Colors to MySpace Add How+to+Use+Web+Colors to Del.icio.us Digg How+to+Use+Web+Colors Add How+to+Use+Web+Colors to Yahoo My Web Add How+to+Use+Web+Colors to Google Bookmarks Add How+to+Use+Web+Colors to Stumbleupon Add How+to+Use+Web+Colors to Reddit


Content copyright © 2009 by Elizabeth Connick. All rights reserved.
This content was written by Elizabeth Connick. If you wish to use this content in any manner, you need written permission. Contact Elizabeth Connick for details.

g


For FREE email updates, subscribe to the HTML Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor

g features
What's Coming in HTML 5

What is FTP?

HTML Fundamentals - Tables

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter

jobs
what
job title, keywords
where
city, state or zip
jobs by job search


vote
Growing a Garden
Veggies and Flowers
Veggies Only
Flowers Only
No Garden

g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2009 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor