Maybe it’s for historical reasons. After all, in the w3c specification, the earliest color space was rgb, and the rgb color space based on the additive principle is more friendly to the display, because the display's channel happens to be three rgb channels.
Correspondingly, cmyk is a color space based on the subtraction principle. Due to the impossibility of completely uniform physical mixing of pigments and ambient light issues, cmyk may be darker than the corresponding rgb space color in actual applications (such as Prints of the same painting tend to appear darker than displays).
However, rgb/rgba are not friendly colors to humans, especially artists. If you have studied art, you must often talk about what color, what brightness, what purity (saturation) this color has, but not how many levels of blue and red this color has. If someone creates directly with css, these hsl attributes can still help. Moreover, HSL is indeed more accurate than RGB in expressing brightness. Of course, this "accuracy" is at the physical level. At the mathematical level, the three color spaces of RGB, CMYK, and HSL can of course be converted to each other.
Another one is that the hsl color space can be used with css3 animation. For example, HSL is obviously more convenient to express the change of the same hue from light to dark.
In terms of film and television post-production special effects production, HSL color space is used more. I wonder if CSS animation will become as complex as American science fiction blockbusters in the future, and HSL will be used on a large scale.
Final complaint: In fact, w3c might as well include the yuv color space unit in the standard...
Because the pages are all from PSD and other design drafts, if it is a color value, it is obtained directly through the color picking software, which is usually a hexadecimal color. Now for some transparent convenience, an RGBA method is added to represent it. Therefore, these two methods are much more popular than HSL.
Then there is also the HSL method, which requires a certain understanding of the three color modes of H, S, and L before it can be operated. Specifically, it is necessary to determine which color value is better based on the project requirements.
Here is a little thing that I used to do in HSL a long time ago. The code is terrible... http://lab.tianyizone.com/color.html
Maybe it’s for historical reasons. After all, in the w3c specification, the earliest color space was rgb, and the rgb color space based on the additive principle is more friendly to the display, because the display's channel happens to be three rgb channels.
Correspondingly, cmyk is a color space based on the subtraction principle. Due to the impossibility of completely uniform physical mixing of pigments and ambient light issues, cmyk may be darker than the corresponding rgb space color in actual applications (such as Prints of the same painting tend to appear darker than displays).
However, rgb/rgba are not friendly colors to humans, especially artists. If you have studied art, you must often talk about what color, what brightness, what purity (saturation) this color has, but not how many levels of blue and red this color has. If someone creates directly with css, these hsl attributes can still help. Moreover, HSL is indeed more accurate than RGB in expressing brightness. Of course, this "accuracy" is at the physical level. At the mathematical level, the three color spaces of RGB, CMYK, and HSL can of course be converted to each other.
Another one is that the hsl color space can be used with css3 animation. For example, HSL is obviously more convenient to express the change of the same hue from light to dark.
In terms of film and television post-production special effects production, HSL color space is used more. I wonder if CSS animation will become as complex as American science fiction blockbusters in the future, and HSL will be used on a large scale.
Final complaint: In fact, w3c might as well include the yuv color space unit in the standard...
Isn’t it because of compatibility?
Because the pages are all from PSD and other design drafts, if it is a color value, it is obtained directly through the color picking software, which is usually a hexadecimal color. Now for some transparent convenience, an RGBA method is added to represent it. Therefore, these two methods are much more popular than HSL.
Then there is also the HSL method, which requires a certain understanding of the three color modes of H, S, and L before it can be operated. Specifically, it is necessary to determine which color value is better based on the project requirements.
Here is a little thing that I used to do in HSL a long time ago. The code is terrible...
http://lab.tianyizone.com/color.html
Compatibility, as well as transparency, RGB and RGBA beat HSL
RGB mode, I can easily imagine various color ratios, and know how to make it redder and bluer,
You asked me to remember the hue, how should I do it?
RGB and RGB are the mainstream ones, W3C recommends this