Fix the color wrap function

The wrap color function isn't working properly, allowing invalid color names for color and not taking reset_color into account.
This commit forces input validation against the list of color codes: if `color` is an invalid color entry, the function returns only the unmodified text; if `reset_color` is invalid, it is set to 'reset'.