HTML Color Code Theory

【Introduction to color code:】

In web design, there are two commonly used color codes: color name and color value. In the HTML4.0 standard, only 16 color names are supported such as red, yellow, etc., and the color value is defined by a hexadecimal notation, which consists of red, green, and blue values.

(RGB), generally used in css

 

【usage:】

①Color name: Only 16 color names are supported by the W3C HTML 4.0 standard, they are: aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, tea, white , yellow.

②Color value: If other colors are used, hexadecimal color values ​​should be used. Hexadecimal values ​​are written using three double digits and begin with a # sign

 

(1) HTML code format:

① Color name, such as red, yellow;

②Color value, such as #000000 pure black; each HTML code contains "#" symbol and 6 subtitles and numbers. These numbers are all in hexadecimal. For example "FF" in hexadecimal stands for the decimal number 255. The lowest value to set a light source can be 0 (00 hex). The highest value is 255 (FF in hex). From 0 to 255 red-green-blue values ​​can combine a total of more than 16 million different colors (calculated from 256 x 256 x 256).

 

(2) Symbol meaning: 

The first two symbols in the HTML color code represent the intensity of red. 00 refers to the lightest color and FF refers to the darkest color. The third and fourth symbols indicate the concentration of green, and the fifth and sixth symbols indicate the concentration of blue. From this, by combining the three colors of red, green, and blue in various concentrations, we can mix any desired color 

 

(3) Example: 

#FF0000 - Using this HTML code, we make the browser display the most vivid red without any green and blue components. The result is of course pure red:      

#00FF00 - This HTML code means only green without any red and blue. the result is:          

#0000FF - This HTML code means only blue without any red and green. the result is:          

#FFFF00 - Combination of red and green produces yellow:      

#CCEEFF - some red, a little green, and the highest concentration of blue, combined into a sky blue:      

 

(expand:)

Web-safe colors refer to a list of colors that are common to any operating system. If you suffer from color blindness, you can read HTML color names to overcome the difficulty of seeing colors.

 

Color list: (here I list a few)

                                                            【Cyber ​​Safe Color Color List】

 

  000000  
  000033  
  000066  
  000099  

 

 

 

 

 

 

 

 

    

.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326182005&siteId=291194637