Css HSL Colors
Css HSL Colors
Css HSL Colors
Dark mode
Dark code
HTML
HSL Value
In CSS, a color can be specified using hue,
saturation, and lightness (HSL) in the form:
HUE
SATURATION
100%
LIGHTNESS
50%
Example
Try it Yourself »
Saturation
Saturation can be described as the intensity of a
color.
50% is 50% gray, but you can still see the color.
Example
Try it Yourself »
Lightness
The lightness of a color can be described as how
much light you want to give the color, where 0%
means no light (black), 50% means 50% light
(neither dark nor light) and 100% means full
lightness (white).
Example
Try it Yourself »
Shades of Gray
Shades of gray are often defined by setting the hue
and saturation to 0, and adjust the lightness from
0% to 100% to get darker/lighter shades:
Example
Try it Yourself »
HSLA Value
HSLA color values are an extension of HSL color
values with an alpha channel - which specifies the
opacity for a color.
HUE
SATURATION
100%
LIGHTNESS
50%
ALPHA
0.5
Example
Try it Yourself »
‹ Previous Next ›
NEW
We just launched
W3Schools videos
Explore now
COLOR PICKER
Get certified
by completing
a CSS
course today!
school
w3 s
2
CE
02
TI 2
R
FI
ED .
Get started
CODE GAME
Play Game
Report Error
Spaces
Pro
Buy Certificate
Top Tutorials
HTML Tutorial
CSS Tutorial
JavaScript Tutorial
How To Tutorial
SQL Tutorial
Python Tutorial
W3.CSS Tutorial
Bootstrap Tutorial
PHP Tutorial
Java Tutorial
C++ Tutorial
jQuery Tutorial
Top References
HTML Reference
CSS Reference
JavaScript Reference
SQL Reference
Python Reference
W3.CSS Reference
Bootstrap Reference
PHP Reference
HTML Colors
Java Reference
Angular Reference
jQuery Reference
Top Examples
HTML Examples
CSS Examples
JavaScript Examples
How To Examples
SQL Examples
Python Examples
W3.CSS Examples
Bootstrap Examples
PHP Examples
Java Examples
XML Examples
jQuery Examples
Get Certified
HTML Certificate
CSS Certificate
JavaScript Certificate
Front End Certificate
SQL Certificate
Python Certificate
PHP Certificate
jQuery Certificate
Java Certificate
C++ Certificate
C# Certificate
XML Certificate
FORUM | ABOUT