The issue has been closed
When I use color.toCSS in-browser, I get an issue, I can't find the reason. My test code below:
import Color from 'color';
new Color({
red: 255,
green: 12,
blue: 210,
alpha: 1
}).toCSS()

why do you think toCSS()
is a function?
posted by Qix- over 5 years ago
thanks for answering me. Because the document I saw like this:
**Each method on a color either returns a new color (or set of colors) or returns a value. You can chain manipulation methods together as much as you need. Eg
var C1 = Red.shiftHue(45).darkenByRatio(0.5).desaturateByAmount(0.1);
A common use case for this code is to set page elements colors to calculated values, the method toCSS provides a string for you to use. eg:
document.getElementById('myElement').style.backgroundColor = C1.toCSS();**
posted by woniuComing over 5 years ago
posted by Qix- over 5 years ago 
oh, sorry,I may have made a mistask. I read this document https://github.com/brehaut/color-js, I just want to use color-js by npm. so I did the following:
npm install color-js --save
can you give me some ideas? thank you
posted by woniuComing over 5 years ago
This isn't color-js, please take the issue over to that repository.
posted by Qix- over 5 years ago