In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Most people do not understand the knowledge points of this article "how to express the color value of css3", so the editor summarizes the following content, detailed content, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to express the color value of css3" article.
Methods: 1, use English words to express color, for example, use "red" to express red; 2, use RGB to express color, syntax is "rgb (red value, green value, blue value)"; 3, use hexadecimal to express color, syntax is "# RRGGBB"; 4, use HSL to represent color, syntax is "hsl (hue, saturation, brightness)".
The operating environment of this tutorial: windows10 system, CSS3&&HTML5 version, Dell G3 computer.
What are the ways to represent the color values of css3
English words denote color
The most direct and simplest way is to use English words of color, such as red, we can write it as color:red.
Disadvantages: there are thousands of colors, not every color has corresponding English words, there will be limitations in use.
Binary and hexadecimal color representation
The components of a hexadecimal color are # RRGGBB, where RR (red), GG (green), and BB (blue), all values must be between 0 and FF. Popularly speaking, the essence of hexadecimal is rgb, with every two bits representing a color. It can be abbreviated when the values of every two digits are the same, for example, color:#ffcc00 can be simplified to color:#fc0.
All major browsers support hexadecimal color values and are recommended.
3. RGB represents color
In RGB, R stands for red red, G for green green, and B for blue blue.
RGB is written as "rgb" (0pc0pm 0). Its values range from 0 to 255, and the larger the value, the darker the color. In addition to using numeric values, RGB can also use 100%, with values between 0% and 100%. For example, RGB (0prime0255) and RGB (0% pencil 0% 100%) represent the same color.
The RGB representation of common colors. Red: rgb (255j0jin0); white: rgb (255255255); black: rgb (0re0jue 0)
All major browsers support RGB color values.
4. HSL represents color
HSL color values represent hue, saturation and brightness, respectively.
The degree to which hue is on the color wheel (from 0 to 360)-0 (or 360) is red, 120 is green, and 240 is blue. Saturation is a percentage value, 0% means gray and 100% shadow, is full color. The brightness is also a percentage, 0% is black and 100% is white.
Note: IE9,Firefox,Chrome,Safari, and Opera10+. HSL color values are supported.
The above is about the content of this article "how to express the color value of css3". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.