-
Couldn't load subscription status.
- Fork 73
Open
Description
Description
Named colors with uppercase letters aren't recognized by the library.
Steps to reproduce
- Load the library (using Codepen, a project, etc.):
import cs from "color-string" - Call the library with a named color with an uppercase letter:
cs.get("Blue") - Note that a null value is returned
Notes
- Though these named colors are supposed to be lowercase by spec, it seems reasonable (and user friendly) to handle uppercase letters as well
- A call to
toLowerCasefor all methods where a string is passed in should take care of it