HTML Color – Engineering Technology Services (2024)

Overview

HTML tags allow you many methods of incorporating color into your web document. You can set the main colors of the page using the <body> tag, you can alter the color of text with the <font> tag and you have control of table's cells and rows' colors as well.

There are two methods of determining color in an HTML tag. One is by placing color value code within the tag and the other is to assign a color name. The use of color names is much easier and will work with most browsers. But the color value code will give you much more control over your color because you are not restricted to a certain few color names.

Either of these methods of incorporating color can be done simply by assigning the value into the "color" attribute of the appropriate HTML tag. <body style="background:silver"> for example, will create a web page with a silver background color.

Color Names

The standard color names that are readable by most browsers are:

aqua gray navy silver
black green olive teal
blue lime purple yellow
fuchsia maroon red white

Many people realized that these colors were rather limiting and so the people behind both both Netscape and Internet Explorer created many more color names to use. These are called the X11 color names. There are far too many of these color names to list here, but a small representative of the list is shown below. Also, there are a total of 100 variants of gray that you can use. The color “gray1” is the darkest and “gray100” is the lightest. The default “gray” shown above is similar to “gray75”.

aliceblue beige chartreuse darkgoldenrod dodgerblue firebrick
gainsboro honeydew hotpink ivory lawngreen linen
midnightblue mintcream oldlace orchid papayawhip peru
rosybrown salmon seashell slateblue thistle whitesmoke

As you can tell, some of the color names are rather odd. And what exactly is the difference between “honeydew” and “mintcream”? You quickly run into the problem that you have far too many names to reference and keep track of. Also, not all browsers can recognize these X11 colors. Which leads me to…

Color Values

If you want much more control of which color will be displayed, or if you feel you are limited by the choices given to you by the color names, then you will want to use color values to input within your HTML tags. This method is the only way to exactly match, for example, the background to a certain color in an image. The one caveat is that this method is somewhat more difficult to understand than the color name method.

All color values are created within an HTML tag by a six-digit hexadecimal number preceded by a hash (#) symbol. For example: “#FF0000” is the color red. This number is a representation of a color value called RGB which stands for Red-Green-Blue. So the first two digits represents the red color, the second two represents green and the last two, blue.

So what does hexadecimal mean? It is a base-16 numbering system that is commonly used by computers. Hexadecimal uses the normal 0 through 9 digits as well as adding the letters A through F as shown in this table:

Number 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Hexadecimal 0 1 2 3 4 5 6 7 8 9 A B C D E F

So, to use color values, you will first need to know the RGB value of your color. (If you use a program such as Adobe Photoshop, this is easily determined.) Each of the three colors of an RGB color will run from 0 (no color) to 255 (full color). Thus full red is 255, 0, 0; full green is 0, 255, 0 and full blue is 0, 0, 255. This combination allows for 16 million different variations.

Once you know the RGB value, you will need to convert it to hexadecimal by using this formula: Divide each value by 16 and multiply the remainder by 16 to gain two digits.

For example: Let's say our RGB color is an dull blue () that has an RGB value of 106, 90, 205. To find the hexadecimal equivalent, we just divide each value by 16 and multiply the remainder by 16. Thus 106 divided by 16 is 6.625. and 16 multiplied by 0.625 is 10. So the first (or red) hexadecimal number is "6A". The green number is 90, which divided by 16 results in 5.625. This makes the green hexadecimal number "5A". For the blue number of 205; 16 divided into it results in 12.8125 and 16 times 0.8125 is 13. So the blue hexadecimal equivalent is "CD". So the final equivalent to RGB 106, 90, 205 is 6A5ACD. This number can then be plugged into an HTML attribute like this: <span style="color: #6A5ACD;">This text is a dull blue color</span>

Fortunately, there are a number of tools you can either find online or download to your computer that will convert RGB to hexadecimal colors. Also, many HTML editors such as Macromedia Dreamweaver have these tools already built in.

One Last Thing

Many older and cheap computer monitors can only display a limited number of colors. Any color outside of this range would be displayed very poorly. This problem is complicated by the differences between PCs, Unix/Linux and Macs and how they each display color. To correct this problem, a collection of “Web Safe” colors was devised. These colors are safe to use and will not be altered by the computer’s monitor. The Web Safe palette of colors is shown below.

Web Safe Colors

Hex Code Color
#FFFFFF
#FFFFCC
#FFFF99
#FFFF66
#FFFF33
#FFFF00
#FFCCFF
#FFCCCC
#FFCC99
#FFCC66
#FFCC33
#FFCC00
#FF99FF
#FF99CC
#FF9999
#FF9966
#FF9933
#FF9900
#FF66FF
#FF66CC
#FF6699
#FF6666
#FF6633
#FF6600
#FF33FF
#FF33CC
#FF3399
#FF3366
#FF3333
#FF3300
#FF00FF
#FF00CC
#FF0099
#FF0066
#FF0033
#FF0000

Hex Code Color
#66FFFF
#66FFCC
#66FF99
#66FF66
#66FF33
#66FF00
#66CCFF
#66CCCC
#66CC99
#66CC66
#66CC33
#66CC00
#6699FF
#6699CC
#669999
#669966
#669933
#669900
#6666FF
#6666CC
#666699
#666666
#666633
#666600
#6633FF
#6633CC
#663399
#663366
#663333
#663300
#6600FF
#6600CC
#660099
#660066
#660033
#660000
Hex Code Color
#CCFFFF
#CCFFCC
#CCFF99
#CCFF66
#CCFF33
#CCFF00
#CCCCFF
#CCCCCC
#CCCC99
#CCCC66
#CCCC33
#CCCC00
#CC99FF
#CC99CC
#CC9999
#CC9966
#CC9933
#CC9900
#CC66FF
#CC66CC
#CC6699
#CC6666
#CC6633
#CC6600
#CC33FF
#CC33CC
#CC3399
#CC3366
#CC3333
#CC3300
#CC00FF
#CC00CC
#CC0099
#CC0066
#CC0033
#CC0000

Hex Color Color
#33FFFF
#33FFCC
#33FF99
#33FF66
#33FF33
#33FF00
#33CCFF
#33CCCC
#33CC99
#33CC66
#33CC33
#33CC00
#3399FF
#3399CC
#339999
#339966
#339933
#339900
#3366FF
#3366CC
#336699
#336666
#336633
#336600
#3333FF
#3333CC
#333399
#333366
#333333
#333300
#3300FF
#3300CC
#330099
#330066
#330033
#330000
Hex Code Color
#99FFFF
#99FFCC
#99FF99
#99FF66
#99FF33
#99FF00
#99CCFF
#99CCCC
#99CC99
#99CC66
#99CC33
#99CC00
#9999FF
#9999CC
#999999
#999966
#999933
#999900
#9966FF
#9966CC
#996699
#996666
#996633
#996600
#9933FF
#9933CC
#993399
#993366
#993333
#993300
#9900FF
#9900CC
#990099
#990066
#990033
#990000

Hex Code Color
#00FFFF
#00FFCC
#00FF99
#00FF66
#00FF33
#00FF00
#00CCFF
#00CCCC
#00CC99
#00CC66
#00CC33
#00CC00
#0099FF
#0099CC
#009999
#009966
#009933
#009900
#0066FF
#0066CC
#006699
#006666
#006633
#006600
#0033FF
#0033CC
#003399
#003366
#003333
#003300
#0000FF
#0000CC
#000099
#000066
#000033
#000000
HTML Color – Engineering Technology Services (2024)
Top Articles
Old Fashioned Butter Tarts Recipe - An Italian in my Kitchen
The Davenport Soft Peanut Brittle Recipe - Krista Gilbert
9.4: Resonance Lewis Structures
Global Foods Trading GmbH, Biebesheim a. Rhein
Brady Hughes Justified
Weeminuche Smoke Signal
Obor Guide Osrs
T Mobile Rival Crossword Clue
Txtvrfy Sheridan Wy
Ati Capstone Orientation Video Quiz
Beautiful Scrap Wood Paper Towel Holder
Espn Expert Picks Week 2
Over70Dating Login
Bubbles Hair Salon Woodbridge Va
The Binding of Isaac
Nj Scratch Off Remaining Prizes
Nonne's Italian Restaurant And Sports Bar Port Orange Photos
RBT Exam: What to Expect
Current Time In Maryland
Cashtapp Atm Near Me
Aldine Isd Pay Scale 23-24
Scotchlas Funeral Home Obituaries
Hermitcraft Texture Pack
Teen Vogue Video Series
Mtr-18W120S150-Ul
11 Ways to Sell a Car on Craigslist - wikiHow
Rs3 Ushabti
Defending The Broken Isles
What Individuals Need to Know When Raising Money for a Charitable Cause
Elite Dangerous How To Scan Nav Beacon
From This Corner - Chief Glen Brock: A Shawnee Thinker
Paris Immobilier - craigslist
Great ATV Riding Tips for Beginners
Medline Industries, LP hiring Warehouse Operator - Salt Lake City in Salt Lake City, UT | LinkedIn
Jailfunds Send Message
Keshi with Mac Ayres and Starfall (Rescheduled from 11/1/2024) (POSTPONED) Tickets Thu, Nov 1, 2029 8:00 pm at Pechanga Arena - San Diego in San Diego, CA
Obituaries, 2001 | El Paso County, TXGenWeb
APUSH Unit 6 Practice DBQ Prompt Answers & Feedback | AP US History Class Notes | Fiveable
25Cc To Tbsp
Appraisalport Com Dashboard /# Orders
Kvoa Tv Schedule
How to Destroy Rule 34
How To Paint Dinos In Ark
Zasilacz Dell G3 15 3579
Red Dead Redemption 2 Legendary Fish Locations Guide (“A Fisher of Fish”)
Dr Mayy Deadrick Paradise Valley
Devotion Showtimes Near Showplace Icon At Valley Fair
Image Mate Orange County
Roller Znen ZN50QT-E
2000 Fortnite Symbols
Acellus Grading Scale
Generator für Fantasie-Ortsnamen: Finden Sie den perfekten Namen
Latest Posts
Article information

Author: Carlyn Walter

Last Updated:

Views: 5952

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Carlyn Walter

Birthday: 1996-01-03

Address: Suite 452 40815 Denyse Extensions, Sengermouth, OR 42374

Phone: +8501809515404

Job: Manufacturing Technician

Hobby: Table tennis, Archery, Vacation, Metal detecting, Yo-yoing, Crocheting, Creative writing

Introduction: My name is Carlyn Walter, I am a lively, glamorous, healthy, clean, powerful, calm, combative person who loves writing and wants to share my knowledge and understanding with you.