In html, color represents the most commonly used 6-digit hexadecimal code notation. In addition, color can also be represented by rgb (r, g, B). r, g, B Represents red, green, and blue in decimal number or percentage from 0 to, respectively. If you are interested, you can see that there are 3 Representation Methods in the HTML, the most commonly used is the 6-digit hexadecimal code notation. For example, bgcolor = # ff0000; # indicates that the color is declared using a 6-digit hexadecimal color code. The first two digits of the Code, ff, represent the red color in the primary color, and the range is of course-ff in hexadecimal notation. The middle two digits, that is, 00, indicate green. The last two digits, that is, 00, indicate blue. 00 indicates no color, ff indicates that the color is the strongest. Therefore, 000000 indicates black, ffffff indicates white, ff0000 indicates pure red, 00ff00 indicates pure green, and 0000ff indicates pure blue.
In addition, the color can also be represented by rgb (r, g, B). r, g, and B in parentheses are represented by a decimal number or percentage ranging from 0 to 255, for example, rgb (255, 0, 0) and rgb (100%, 0%, 0%) indicate RED.
The color representation can also be represented by the color keyword, a total of 16, respectively:
Black and Black #000000
Maroon dark brown #800000
Green #008000
Olive #808000
Navy #000080
Purple #800080
Teal duck green #008080
Gray #808080
Silver # C0C0C0
Red # FF0000
Lime Acid Orange #00FF00
Yellow # FFFF00
Blue # 0000FF
Fuchsia pinghong # FF00FF
Aqua water blue #00 FFFF
White # FFFFFF
For example, bgcolor = red can be written as follows:
The Code is as follows:
Bgcolor = rgb (100%, 0, 0), bgcolor = rgb (0%, 0%,), bgcolor = # ff0000;