RGB color parser in JavaScript

I coded a simple JavaScript class to accept input such as “red” or “ff0033” or “light sky blue” or “fb0” and deduct a valid color out of the string.