color-parser icon indicating copy to clipboard operation
color-parser copied to clipboard

Fix for incorrect color parsing for certain strings.

Open Me1000 opened this issue 5 years ago • 0 comments

The color-parser looks up color names in an object that inherits from the object prototype, this causes lookups like color["constructor"] to return a function, which then causes the parser to return the malformed color {r: undefined, g: undefined, b: undefined }.

This PR fixes that issue.

Fixes #7.

Me1000 avatar Jul 10 '19 18:07 Me1000