term-color

A lighter weight alternative to chalk

MIT License

Downloads
30.2K
Stars
9
Committers
1

term-color

A lighter weight alternative to chalk

Example

var TermColor = require("term-color");

console.log(TermColor.red('foo'))

Motivation

raynos at raynos-SVS15127PXB  ~/projects/chalk on master
$ npm ls --prod
[email protected] /home/raynos/projects/chalk
├── [email protected]
├── [email protected]
├─┬ [email protected]
 ├── [email protected]
 └── [email protected]
├─┬ [email protected]
 └── [email protected]
└── [email protected]
raynos at raynos-SVS15127PXB  ~/projects/term-color on master
$ npm ls --prod
[email protected] /home/raynos/projects/term-color
├── [email protected]
└── [email protected]

term-color adds colors to your library but only costs 3 dependencies instead of costing 9 dependencies.

Supported formats

TermColor.black('text');
TermColor.red('text');
TermColor.green('text');
TermColor.yellow('text');
TermColor.blue('text');
TermColor.magenta('text');
TermColor.cyan('text');
TermColor.white('text');
TermColor.gray('text');
TermColor.bgBlack('text');
TermColor.bgRed('text');
TermColor.bgGreen('text');
TermColor.bgYellow('text');
TermColor.bgBlue('text');
TermColor.bgMagenta('text');
TermColor.bgCyan('text');
TermColor.bgWhite('text');
TermColor.reset('text');
TermColor.bold('text');
TermColor.dim('text');
TermColor.italic('text');
TermColor.underline('text');
TermColor.inverse('text');
TermColor.hidden('text');
TermColor.strikethrough('text');

Installation

npm install term-color

Tests

npm test

Contributors

  • Raynos

MIT Licensed

Package Rankings
Top 3.9% on Npmjs.org