better error handling for colors