CSS3 HSLA color property


HSLA stands for hue, saturation, lightness, and alpha. The alpha value specifies the opacity as shown RGBA.

Example

The following example shows HSLA color property −

Live Demo

<html>
   <head>
      <style>
         #d1 {background-color:hsla(120,100%,50%,0.3);}
         #d2 {background-color:hsla(120,100%,75%,0.3);}
         #d3 {background-color:hsla(120,100%,25%,0.3);}
      </style>
   </head>
   <body>
      <p>HSLA colors:</p>
      <p id = "d1">Less opacity green</p>
      <p id = "d2">Green</p>
      <p id = "d3">Green</p>
   </body>
</html>

Updated on: 29-Jun-2020

144 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements