As per the CSS Colors Module Level 4 specification, you can use space-separated values for all CSS color functional notations. The following table shows the old comma-separated syntax and its equivalent using the new space-separated syntax:
Other than these, the
color() functional notations also support the space-separated syntax. However, they do not support the old comma-separated syntax. To keep things uniform, perhaps it's a good idea to start using the new space-separated syntax. It is supported by all major browsers.
In the new syntax, you can specify the alpha channel using
hsl() instead of using
hsla() (which merely exist as an alias to
hsl() as per the new spec).
When using the CSS Colors 4 space-separated values, the alpha channel value can either be a number between
1 or a percentage between
Hope you found this post useful. It was published . Please show your love and support by sharing this post.