defunkt/colored — pull request #4 by egonSchiele (2013-03-25 17:25:07+00:00)
Title: Check for tty before coloring

This accounts for redirecting (for example for log files). So the string only gets colored if the user is going to see it, otherwise we don't color to prevent cruft in log files.