Color
The arithmetic of colours
Hue
A color’s hue is an angle in degrees:
hue is the first argument for two similar CSS functions, hsl(hue saturation lightness) and hwb(hue whiteness blackness).
Separating the arguments with commas is considered legacy. Hue defaults to degrees and can be written verbosely 120deg with other angle coordinates available.
Saturation
This represents the saturation of the output color. Here 100% is completely saturated, while 0% is completely unsaturated (gray).
Lightness
This represents the lightness of the output color. Here 100% is white, 0% is black, and 50% is “normal”.
hsl(H 100% 50%) is the same as hwb(H 0% 0%)
Alpha
Both functions have an optional fourth argument ranging from 0 for fully transparent to 1 for fully opaque.