colors / 1.0.3 last updated a month ago created on Mar 15th 2011
Install
npm install --save colors
Clone
git clone git@github.com:Marak/colors.js.git
dependencies
No dependencies listed.
maintainers
marak
versions
8 total
| 1.0.3 | a month ago | marak |
| 1.0.2 | a month ago | marak |
| 1.0.1 | a month ago | marak |
| 1.0.0 | a month ago | marak |
| 0.6.2 | a year ago | marak |
| 0.6.1 | a year ago | marak |
| 0.6.0 | 3 years ago | marak |
| 0.6.0-1 | 3 years ago | marak |
readme
colors.js
get color and style in your node.js console

Installation
colors and styles!
text colors
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
- gray
- grey
background colors
- bgBlack
- bgRed
- bgGreen
- bgYellow
- bgBlue
- bgMagenta
- bgCyan
- bgWhite
styles
- reset
- bold
- dim
- italic
- underline
- inverse
- hidden
- strikethrough
extras
- rainbow
- zebra
- america
- trap
- random
Usage
By popular demand, colors now ships with two types of usages!
The super nifty way
or a slightly less nifty way which doesn't extend String.prototype
I prefer the first way. Some people seem to be afraid of extending String.prototype and prefer the second way.
If you are writing good code you will never have an issue with the first approach. If you really don't want to touch String.prototype, the second usage will not touch String native object.
Disabling Colors
To disable colors you can pass the following arguments in the command line to your application:
Console.log string substitution
Custom themes
Using standard API
Using string safe API
Protip: There is a secret undocumented style in colors. If you find the style you can summon him.