transform-colors
Color conversion and transform library
Installation
npm install transform-colors
Usage
const transformColors = ; console;
Methods
rgb2hex(r, g, b)
const tsclr = ;console;// #FF0000
rgb2hsl(r, g, b)
const tsclr = ;console;// [0, 50, 100]
hsl2hex(h, s, l)
const tsclr = ;console;// #FF0000
hsl2rgb(h, s, l)
const tsclr = ;console;// [255, 0, 0]
hex2rgb(String #XXXXXX)
const tsclr = ;console;// [255, 0, 0]
hex2hsl(String #XXXXXX)
const tsclr = ;console;// [0, 50, 100]