Add colour to the console
Add colours and style to the node.js console output.
Alternatives
https://www.npmjs.org/package/colors, but it modifies String.prototype
and is therefore wrong.
Intallation
$ npm install console-style
Usage
var style = ; // Output bold, underlined and red textconsole;
The arguments applied to the style are passed to util.format
. This means objects will be inspected, and placeholders can be used.
// Alternative syntaxconsole;
This syntax does not use util.format
.
Options
See http://en.wikipedia.org/wiki/ANSI_colors#Colors
- bold
- italic - not widely supported
- underline
- inverse
- strikethough - not widely supported
- white
- black
- blue
- cyan
- green
- magenta
- red
- yellow
- whiteBG
- blackBG
- blueBG
- cyanBG
- greenBG
- magentaBG
- redBG
- yellowBG