color-parser
color-parser copied to clipboard
Fix for incorrect color parsing for certain strings.
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.