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.

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
How to Change Your Life: 8 Steps to Start Over and Build a Life You Want
About Us | Liquid.com
It's Official: Sabrina Carpenter's Bangs Are Taking Over TikTok
Gamevault Agent
Jazmen Jafar Linkedin
Phcs Medishare Provider Portal
East Cocalico Police Department
Rabbits Foot Osrs
Activities and Experiments to Explore Photosynthesis in the Classroom - Project Learning Tree
Steamy Afternoon With Handsome Fernando
Craigslist Kennewick Pasco Richland
Ou Class Nav
Strange World Showtimes Near Cmx Downtown At The Gardens 16
[PDF] INFORMATION BROCHURE - Free Download PDF
Transformers Movie Wiki
Slag bij Plataeae tussen de Grieken en de Perzen
MindWare : Customer Reviews : Hocus Pocus Magic Show Kit
United Dual Complete Providers
What Time Chase Close Saturday
Meritas Health Patient Portal
I Wanna Dance with Somebody : séances à Paris et en Île-de-France - L'Officiel des spectacles
Define Percosivism
London Ups Store
Craiglist Tulsa Ok
Dirt Removal in Burnet, TX ~ Instant Upfront Pricing
Jet Ski Rental Conneaut Lake Pa
Beverage Lyons Funeral Home Obituaries
Barber Gym Quantico Hours
Spn 520211
Village
Piedmont Healthstream Sign In
Ltg Speech Copy Paste
Local Collector Buying Old Motorcycles Z1 KZ900 KZ 900 KZ1000 Kawasaki - wanted - by dealer - sale - craigslist
Belledelphine Telegram
Meta Carevr
Ardie From Something Was Wrong Podcast
Shia Prayer Times Houston
Guide to Cost-Benefit Analysis of Investment Projects Economic appraisal tool for Cohesion Policy 2014-2020
Song That Goes Yeah Yeah Yeah Yeah Sounds Like Mgmt
Lucky Larry's Latina's
Is The Nun Based On a True Story?
Qlima© Petroleumofen Elektronischer Laserofen SRE 9046 TC mit 4,7 KW CO2 Wächter • EUR 425,95
Craigslist Boats Dallas
Hkx File Compatibility Check Skyrim/Sse
Academic Calendar / Academics / Home
The Nikki Catsouras death - HERE the incredible photos | Horror Galore
Craigslist Sarasota Free Stuff
Urban Airship Acquires Accengage, Extending Its Worldwide Leadership With Unmatched Presence Across Europe
How to Find Mugshots: 11 Steps (with Pictures) - wikiHow
Escape From Tarkov Supply Plans Therapist Quest Guide
La Fitness Oxford Valley Class Schedule
Cbs Scores Mlb
Latest Posts
Article information

Author: Ms. Lucile Johns

Last Updated:

Views: 6275

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Ms. Lucile Johns

Birthday: 1999-11-16

Address: Suite 237 56046 Walsh Coves, West Enid, VT 46557

Phone: +59115435987187

Job: Education Supervisor

Hobby: Genealogy, Stone skipping, Skydiving, Nordic skating, Couponing, Coloring, Gardening

Introduction: My name is Ms. Lucile Johns, I am a successful, friendly, friendly, homely, adventurous, handsome, delightful person who loves writing and wants to share my knowledge and understanding with you.