Using Color On Your Web Page
In HTML we use Hexadecimal Color Codes [based on RGB values] or Color Names to insert colors into HTML documents.
Hexadecimal Color Codes
The Hexadecimal Color Code consists of 6 numbers and/or letters, combining to give you over 14 million possible colors, shades, hues and tints.
The 6-number-and/or-letter combinations are actually 3 pairs of values
where RR, GG, BB are the hexadecimal digits specifying the Red, Green, and Blue values of the color. This value is written as #RRGGBB. The number values range from 0 – 9; letter values range from A to F.
where RR, GG, BB are the hexadecimal digits specifying the Red, Green, and Blue values of the color. This value is written as #RRGGBB. The number values range from 0 – 9; letter values range from A to F.
< FONT COLOR=“#0000FF”>Here is some example text I want to color< /FONT >
The above line of code will display the example text in blue like this:
Here is some example text I want to color
Color Names
Colors can also be specified by their official Color Name. Originally there were 16 Color Names,
picked as the standard 16 colors supported with the Windows VGA palette. Today there are hundreds of standard colors with official color names.
picked as the standard 16 colors supported with the Windows VGA palette. Today there are hundreds of standard colors with official color names.
A Color Name is used in this format:
< FONT COLOR=“blue”>Here is some example text I want to color< /FONT >
The above line of code will display the example text in blue like this:
Here is some example text I want to color
Both methods are perfectly legitimate methods of defining HTML colors but the Hexadecimal Color Code system will give you a much wider range of possible color choices.
Using Color On Your Web Page
Reviewed by JohnBlogger
on
5:04 AM
Rating:
No comments: