in reply to How to print colored word in text file

red color in a text file

Colour as in coloured text is some kind of formatting.

Text files are understood as to contain text, but no such formatting.

So the answer is you don't. In order to colour text, you need an output format that can colour text like some rich text format or html. Do you have something in mind already?

Cheers, Sören

(hooked on the Perl Programming language)

  • Comment on Re: How to print colored word in text file