CSS3 HSL (Hue, Saturation, Lightness) Color Samples

, , …,
Want to master JavaScript in a week? Example based, to the point. Xah JavaScript Tutorial.

You can use HSL color model to specify a color. Here's the syntax:

css selector {background-color:hsl(hue, saturation, lightness)}


span.xyz {color:hsl( 0, 100%, 50%)}

HSL Color Model

HSL color model
HSL color model. img src

HSL Color Examples

Varying Hue

Varying Saturation

Varying Lightness

Lightness goes from black to white.

See also: CSS Color Transparency/Opacity.



blog comments powered by Disqus