Fix the color wrap function

The wrap color function wasn't working properly with the reset_color parameter or with non-valid color names.