JSFiddle - React, Tailwind, and code Playground

by Wagner Souza

HTML

<h4>Escurecer cores, HSLA();</h4>

<div class="box">151515</div>
<div class="box green">71c73e</div>
<div class="box red">a00000</div>

CSS

@import url(http://fonts.googleapis.com/css?family=Lora);

.box {
    background: hsl(0, 0%, 8%);
    color: #fff;
    max-width: 30%;
    text-align: center;
    margin: .5em 0;
    font-family: "Lora", serif;
    position: relative;
    height: 35px;
    line-height: 35px;
    border-radius: 1px;
    box-shadow: hsla(0, 0%, 8%, .5) 2px 2px 0;
}

.box::before {
    content: "#";
    background: hsla(0, 0%, 0%, .2);
    position: absolute;
    top: 0;
    left: 0;
    width: 20%;
    height: 100%;
}

.green {
    background-color: hsl(98, 55%, 51%);
    box-shadow: hsla(98, 55%, 51%, .5) 2px 2px 0;;
}

.red {
    background-color: hsl(0, 100%, 31%);
    box-shadow: hsla(0, 100%, 31%, .5) 2px 2px 0;;
}