If you want to generate html, say for converting to an email you can use http://www.pixelbeat.org/scripts/ansi2html.sh
For example:
your_script | ansi2html.sh --bg=dark > blah.html
or your_script | ansi2html.sh | mail -a "Content-Type: text/html" Your@email.com