Tiny library to put colors into stdin/stdout 🎉
npm install --save-dev kolorist
import { red, cyan } from 'kolorist';
console.log(red(`Error: something failed in ${cyan('my-file.js')}.`));
You can also disable colors globally via the following environment variables:
NODE_DISABLE_COLORS
TERM=dumb
FORCE_COLOR=0
On top of that you can disable colors right from node:
import { options, red } from 'kolorist';
options.enabled = false;
console.log(red('foo'));
// Logs a string without colors
MIT
, see the license file.