print_with_color will get you part of the way, but it doesn’t do everything you 
want. Looking at its code should get you started to a full implementation of 
what you need.

 — John

On Jun 14, 2014, at 7:12 PM, Aerlinger <[email protected]> wrote:

> I'm trying to print colored text in the shell/REPL according to the ANSI 
> sequence elements (http://en.wikipedia.org/wiki/ANSI_escape_code#Colors). Is 
> there any way to format UNIX colored strings like the following?
> 
> colorize("Hello", "red", "yellow")
> 
> Raw string:
> Hello
> 
> Visual output:
> Hello
> 

Reply via email to