Kolors
A simple module which could manage colors programmatically.
Installation
npm install kolors
Usage
const Kolor = ; // You can specify a RGB hex color code into constructorconst kolor = '#239cec'; /* or HSL color values.const kolor = new Kolor({ h: 203.88059701492537, s: 84.10041841004184, l: 53.13725490196079}); */ console // 239cecconsole // { h: 203.88059701492537, s: 84.10041841004184, l: 53.13725490196079 } // Update Huekolor; // 10% warmerkolor; // 20% colder // Update Saturatekolor; // 30% brighterkolor; // 40% duller // Update Luminancekolor; // 50% lighterkolor; // 60% darker console // 214182console // { h: 220.1910447761194, s: 60, l: 31.882352941176478 }
Browser Support
If you want to use Kolors directly in the browser, just include kolors.browser.js
in your html.