You can specify color using "hexadecimal" notation. Whereas the decimal numbering system uses the characters 0 through 9 to get 10 values, the hexadecimal numbering system uses the characters 0 through f to get 16 values.
Welcome to Bucaro TecHelp!

Welcome to Bucaro TecHelp!
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact Advertise on Bucaro TecHelp Advertise Here RSS News Feeds News Feeds

HTML5 Solutions: Essential Techniques for HTML5 Developers

Essential Techniques for HTML5 Developers

HTML5 brings the biggest changes to HTML in years. Web designers now have new techniques, from displaying video and audio natively in HTML, to creating realtime graphics on a web page without a plugin.

This book provides a collection of solutions to all of the most common HTML5 problems. Every solution contains sample code that is production-ready and can be applied to any project.

Click Here

Hexadecimal Color Notation on the Web

When designing elements for your webpage, you will often be called upon to specify a color. For example, the code for a span shown below specifies that the color of the text within the span will be yellow.

<span style="font-family:verdana; color:yellow;">Text</span>

Colors can be specified according to their names, for example "yellow", "green", or "blue". In many cases, these simple color names will work. But what if you want to specify a more sophisticated color like "cornflowerblue"? A particular browser may not recognize a particular color name. It's more reliable to specify colors with an "RGB triplet".

An RGB triplet specifies a color based upon the amounts of red, green, and blue, on a scale from 0 to 255, required to create the color. For example, to create the color cornflowerblue you need red=100, green=149, and blue=237. We could then specify the color of the text within a span using the rgb function as shown below.

<span style="font-family:verdana; color:rgb(100,149,237);">Text</span>

This will work fine with style notation, but what if you want to use straight html. Html doesn't recognize the rgb function. In that case, you can specify color using "hexadecimal" notation. Whereas the decimal numbering system uses the characters 0 through 9 to get 10 values, the hexadecimal numbering system uses the characters 0 through f to get 16 values. (After 9 the characters a, b, c, d, e and f are used, as shown below.)

Decimal Hexidecimal Equivilants

decimalhexadecimal
00
11
22
33
44
55
66
77
88
99
10A
11B
12C
13D
14E
15F

On first appearance, this looks pretty simple but you need two hexadecimal characters to represent all decimal values from 0 to 255. When you increment decimal 9 by 1, you change the 9 to 0 and put 1 in the ten's place. When you increment hexidecimal F by one, you change the F to 0 and put 1 in the "sixteens" place. Sometimes it's not easy to convert between decimal and hexadecimal in your head.

RGB Triplet for Cornflowerblue

 decimalhexadecimal
red10064
green14995
blue237ED

We could then specify the color of text within a span using the hexadecimal notation as shown below.

<span style="font-family:verdana; color:#6495ed;">Text</span>

Note that when we indicate the use of hexadecimal notation by placing a pound (#) sign in front of the number, and we don't use commas to separate the color components.

Web Design Sections

RSS Feed RSS Feed

Google Reader or Homepage
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online

Add to My AOL
Add to Technorati Favorites!

Graphics Design
Pencil Free Open Source Cartoon Animation Drawing Program
Animation Software - The Amazing 3D World
Graphic Design Meets Open Source
Anti-Aliasing
Free Animated GIF Maker
Paint Shop Pro : Version 4 Was Best
Graphics File Formats for Your Web Page
The Browser Safe Palette
Image Scanning : Confused About DPI?
An Insight to Logos
Building an Image with a Logo
CSS Button Designer
What is the Pantone Color System?
Color Harmony in Web Design
RGB Color Schemer
RGB Color Schemer FAQs
RGB Vs CMYK
Hexadecimal Color Notation on the Web
Web Designer's Reference
Beginning GIMP: From Novice to Professional
The Game Maker's Apprentice
The Blender Gamekit
Stop Motion Animation: Nine Creative and Easy Techniques
How to Make a Simple Video
How to Create a Simple Video with Windows Movie Maker
How to Embed a YouTube Video in Your Webpage
Free eBook - How to Be a Video Game Designer
How to Make a Video Game for your Xbox for Free
Get GIMP - Free Replacement for Overpriced Photoshop
Use GIMP to Scale (Resize) an Image
Graphics Design for Beginners - Cropping Images
Graphics Design for Beginners - Blur Filters
Create GIF Animations With Free GIMP Image Editing Program
How to De-haze a Photo with GIMP
How to Make Beautiful Skies with GIMP
Inkscape - Free Vector Graphics Illusttration Package
Inkscape Basics
Basic Inkscape Vector Drawing
Inkscape - How to Add a New Node
Inkscape - How to Join Two Segments at Endnodes
How to Place Greek Letters in an Inkscape Drawing
How to Make a Simple Animated Banner in Flash CS3
How to Trace an Image Using Photoshop
How to Create a Product Box in Photoshop


[Site User Agreement] [Advertise on This site] [Search This Site] [Contact Form]
Copyright©2001-2011 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268