0.1.0 • Published 11 years ago

shellcolor v0.1.0

Weekly downloads
4
License
-
Repository
github
Last release
11 years ago

shellcolor Build status Code coverage status

ANSI colors for your Node.js app's stdout, stderror, and logs

Installation

Get shellcolor with npm.

npm install shellcolor --save

Usage

Pass a bland string to shellcolor(), get a colorful string back.

var shellcolor = require('shellcolor');

console.log(shellcolor('<b><green>Success:<green></b> Process started.'));
  
console.warn(shellcolor('<b><yellow>Error:</yellow></b> Something seems wrong....'));

console.error(shellcolor('<b><red>Error:</red></b> Something broke.'));

Tags

The following tags are available:

TagDescriptionANSI
<black>black text30
<red>red text31
<green>green text32
<yellow>yellow text33
<blue>blue text34
<magenta>magenta text35
<cyan>cyan text36
<white>white text37
<grey>grey text90
<bg-black>black background40
<bg-red>red background41
<bg-green>green background42
<bg-yellow>yellow background43
<bg-blue>blue background44
<bg-magenta>magenta background45
<bg-cyan>cyan background46
<bg-white>white background47
<bg-grey>grey background100
<b>bold1
<i>italics3
<u>underline4
<blink>flash text5

License

shellcolor is licensed under the permissive BSD license.