এলিমেন্টের রং সেট করার সময় HSL মানে Hue, Saturation এবং Lightness। Hue মান ০ থেকে ৩৬০, যেখানে ০ বা ৩৬০ লালের জন্য, ২৪০ নীলের জন্য, ১২০ সবুজের জন্য। Saturation এবং Lightness শতাংশ মান।
উদাহরণ
HSL রং মান উদাহরণ:
<!DOCTYPE html>
<html>
<head>
<style>
#demo1 {background-color: hsl(150, 100%, 50%);}
#demo2 {background-color: hsl(150, 100%, 50%);}
#demo3 {background-color: hsl(140, 100%, 40%);}
#demo4 {background-color: hsl(120, 100%, 40%);}
#demo5 {background-color: hsl(120, 100%, 30%);}
#demo6 {background-color:rgba(108,111,35,0.6);}
</style>
</head>
<body>
<h1>Cricketers</h1>
<p id="demo1">David Warner</p>
<p id="demo2">Steve Smith</p>
<p id="demo3">Mark Waugh</p>
<p id="demo4">Steve Waugh</p>
<p id="demo5">David Johnson</p>
<p id="demo6">Andy Bichel</p>
</body>
</html>
আউটপুট
