1. HSL Colors:
You can use HSL values as the value of the color property in the style attribute (
Example:
<p style="color:hsl(0,100%,50%);"> The HSL color value is used in this text. </p>
Output:
The HSL color value is used in this text.
List of Common HSL Color Values as follows:
- hsl(0,100%,50%) → Red
- hsl(120,100%,50%) → Green
- hsl(240,100%,50%) → Blue
- hsl(60,100%,50%) → Yellow
- hsl(0,0%,0%) → Black
- hsl(0,0%,100%) → White
2. HSLA Colors:
You can use HSLA values as the value of the color property in the style attribute (
Example:
<p style="color:hsla(0,100%,50%,0.5);"> This example uses the HSLA color value in a line. </p>
Output:
This example uses the HSLA color value in a line.
List of Common HSLA Color Values as follows:
- hsla(0,100%,50%,0.5) → Red
- hsla(120,100%,50%,0.5) → Green
- hsla(240,100%,50%,0.5) → Blue
- hsla(60,100%,50%,0.5) → Yellow
- hsla(0,0%,0%,0.5) → Black
- hsla(0,0%,100%,0.5) → White
