yetzt / node-rgbcolor

A nodejs module to parse color values

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Didn't recognize rgb(100%,100%,100%)

ariutta opened this issue · comments

Hi there, thanks for making this library! I wanted to check -- should this library handle SVG colors? Right now, it returns false for this value:

var RGBColor = require("rgbcolor");
const color = new RGBColor("rgb(100%,100%,100%)");
if (!color.ok) {
	throw new Error("Did not recognize this input")
       // => throws error
}

i didn't make this library, it's from here and i just put it to npm. but i'll be happy to merge a pull request with a fix.

I don't want to bloat the lib if no one else needs SVG colors included, so let's table it for now. But if anyone else wants them included, I can make a pull request.