This is my lib to handle colors in JavaScript in Node.js and in browser.
There are handy funtions like Color.invertGoodReadable()
or Color.lum()
to set color luminance
new Color("#000000").random().toString()
"rgb(247,51,46)"
new Color("#000000").random().hex()
"#a41991"
Todo: This lib is only prepared to handle RGBA colors.