Color principle The color representation of HTML can be divided into two types:
- Define commonly used colors, such as RED, in a named way.
- Expressed as an RGB value, such as the #FF0000 for Red.
Naming methods include a small number of colors and is not very convenient, so less use, the following describes the principle of RGB values: It is well known that colors are composed of "Red" "Green" "Blue" Three primary colors, the definition of color in HTML is in hexadecimal, for three primary colors of HTML is given two 16 carry to define, That is, each primary color has 256 kinds of color, so the three primary colors can be mixed into Bastovin color. For example
The composition of the White is Red=ff, Green=ff, BLUE=FF, RGB value is FFFFFF The red composition is Red=ff, green=00, blue=00, RGB value is ff0000 The green composition is red=00, Green=ff, blue=00, RGB value is 00ff00 The blue composition is red=00, green=00, BLUE=FF, RGB value is 0000ff The composition of Black is red=00, green=00, blue=00, RGB value is 000000 When applied, the RGB value is usually preceded by a symbol # to show the difference, but not plus. |