time-to-color-converter
v2.0.1
Published
Convert Date object to HLS values.
Downloads
4
Readme
Install
$ npm install time-to-color-converterUsage
import convert from 'time-to-color-converter';or
const convert = require('time-to-color-converter');then
const { h, s, l } = convert(new Date(), false); // Set true to the second parameter if you use this for the southern hemisphere.You can use these values like below.
document.getElementsByTagName('body')[0].style.backgroundColor = `hsl(${h}, ${s}%, ${l}%)`;