added better error message for invalid colors