If a color string is a number, then we can use a RegExp to check if it\'s a valid CSS color. But what if it\'s a word?
RegExp
I have code that generates contro
The input is often incorrect with the output. If you check the length of the values, you get either an empty string or a value in the CSS2 tree
function isColor(string) { var s = new Option().style; s.color = string; return s.color.length > 0; }