The hsl() function is an inbuilt function in CSS which is used to define the colors using the Hue-saturation-lightness model (HSL).
hsl( hue, saturation, lightness )
Parameters: This function accepts three parameters as mentioned above and described below:
- hue: This parameter is used to define the degree on the color wheel. Its value lies between 0 to 360 where 0 or 360 represents red, 120 represents green and 240 represents blue.
- saturation: This parameter is used to define the saturation where 0% represents shade of gray and 100% represents full color.
- lightness: This parameter is used to define the lightness where 0% represents black, 50% represents normal, and 100% represents white.
Below program illustrates the hsl() function in CSS:
Supported Browsers: The browser supported by hsl() function are listed below:
- Chrome 1.0 and above
- Internet Explorer 9.0 and above
- Firefox 1.0 and above
- Safari 3.1 and above
- Opera 9.5 and above
- How to get the function name inside a function in PHP ?
- D3.js | d3.map.has() Function
- D3.js | d3.map.get() Function
- p5.js | sin() function
- p5.js | log() function
- p5.js | cos() function
- p5.js | red() function
- PHP | Ds\Map get() Function
- D3.js | d3.lab() Function
- p5.js | str() function
- D3.js | d3.hcl() Function
- PHP | cos( ) Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.