Fixes an error when an undefined color is provided.