In general, you don't, because you don't know whether the recipient has a color-aware display device. If you know that they have an
ANSI terminal that understands color, you can use the Term::ANSIColor module from
CPAN: