Horje
How to create HTML Shades of Gray | HTML HSL Colors Code
How to create HTML Shades of Gray

Shades of gray are often defined by setting the hue and saturation to 0, and adjusting the lightness from 0% to 100% to get darker/lighter shades:


Full Example of HTML Shades of Gray

Try following
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h1 style="background-color:hsl(0, 0%, 20%);">hsl(0, 0%, 20%)</h1>
<h1 style="background-color:hsl(0, 0%, 30%);">hsl(0, 0%, 30%)</h1>
<h1 style="background-color:hsl(0, 0%, 40%);">hsl(0, 0%, 40%)</h1>
<h1 style="background-color:hsl(0, 0%, 60%);">hsl(0, 0%, 60%)</h1>
<h1 style="background-color:hsl(0, 0%, 70%);">hsl(0, 0%, 70%)</h1>
<h1 style="background-color:hsl(0, 0%, 90%);">hsl(0, 0%, 90%)</h1>

</body>
</html>

Output should be:

Full Example of HTML Shades of Gray



Read Full::
HTML HSL Colors Code
Category:
HTML Code
Sub Category:
HTML HSL Colors Code
Uploaded:
10 months ago
Uploaded by:
Admin
Views:
3

Related Articles
What is HTML HSL and HSLA Colors HTML HSL Colors Code
How to create HTML HSL Color Values HTML HSL Colors Code
How to create HTML Saturation Color HTML HSL Colors Code
How to create HTML Lightness Color HTML HSL Colors Code
How to create HTML Shades of Gray HTML HSL Colors Code
How to create HTML HSLA Color Values HTML HSL Colors Code

Single Articles
Full Example of HTML Shades of Gray

Share on: