cli-color-tty

The cli-color module but TTY aware. It provides a cli-color compatible API that doesn't colorize your strings for non-TTY use.
Example
var clc = require('cli-color-tty')(true)
console.log(clc.red('RED'))
clc = require('cli-color-tty')(false)
console.log(clc.red('RED'))
Usage
var clc = require('cli-color-tty')()
After calling the factory function, use it as per the cli-color docs.
Pass true
to the factory function to get back the cli-color module.
Pass false
to get back a cli-color compatible object that doesn't colorize your strings.
Defaults to process.stdout.isTTY