CSS hsla() Function
CSS hsla() Function
The hsla() function is used to define colors using the Hue Saturation Lightness Alpha model (HSLA). In this, H stands for Hue, S stands for Saturation, L stands for Lightness, and A stands for Alpha. It is used basically used for changing the opacity of elements.
Syntax:-
Its syntax is:- hsla(hue, saturation, lightness, alpha)
Further Explanation:-
Value | Description |
---|---|
hue | Defines a degree on the color circle from 0 to 360. |
saturation | Defines the saturation. 0% is a shade of gray and 100% is the full color. |
lightness | Defines the lightness; 0% is black, 50% is normal, and 100% is white. |
alpha | Defines the opacity between 0 and 1. |