JSFiddle - React, Tailwind, and code Playground
by devgru
HTML
<div class="block status_error dark">test@bocore-demo</div>
<div class="block status_critical dark">symboldb@claudius</div>
<div class="block status_warning light">[email protected]</div>
<div class="block status_success light">[email protected]</div>
CSS
</style>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:400italic,700,600,400"><style>
.block {
cursor: pointer;
display: block;
font-family: 'Open Sans', sans-serif;
font-size: 17px;
height: 20px;
line-height: 20px;
margin-bottom: 5px;
padding: 5px 10px;
white-space: nowrap;
width: 354px;
}
.dark {
color: white;
text-shadow: 0 0 15px rgba(0,0,0,0.25), 0 0 1px rgba(0,0,0,0.5);
}
JavaScript
hcl = d3.hcl
d3.select('.status_error').style('background', hcl(35, 70, 5))
d3.select('.status_critical').style('background', hcl(35, 90, 50))
d3.select('.status_warning').style('background', hcl(90, 70, 100))
d3.select('.status_success').style('background', hcl(130, 60, 100))
console.log(hcl(35, 70, 5).toString())
console.log(hcl(35, 90, 50).toString())
console.log(hcl(90, 70, 100).toString())
console.log(hcl(130, 60, 100).toString())