handling invalid colors