checking for valid color