diff options
Diffstat (limited to 'node_modules/colors/README.md')
-rw-r--r-- | node_modules/colors/README.md | 41 |
1 files changed, 39 insertions, 2 deletions
diff --git a/node_modules/colors/README.md b/node_modules/colors/README.md index 4bebb6c92..fabe55890 100644 --- a/node_modules/colors/README.md +++ b/node_modules/colors/README.md @@ -29,6 +29,16 @@ Please check out the [roadmap](ROADMAP.md) for upcoming features and releases. - gray - grey +### bright text colors + + - brightRed + - brightGreen + - brightYellow + - brightBlue + - brightMagenta + - brightCyan + - brightWhite + ### background colors - bgBlack @@ -39,6 +49,18 @@ Please check out the [roadmap](ROADMAP.md) for upcoming features and releases. - bgMagenta - bgCyan - bgWhite + - bgGray + - bgGrey + +### bright background colors + + - bgBrightRed + - bgBrightGreen + - bgBrightYellow + - bgBrightBlue + - bgBrightMagenta + - bgBrightCyan + - bgBrightWhite ### styles @@ -94,12 +116,27 @@ I prefer the first way. Some people seem to be afraid of extending `String.proto 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 +## Enabling/Disabling Colors -To disable colors you can pass the following arguments in the command line to your application: +The package will auto-detect whether your terminal can use colors and enable/disable accordingly. When colors are disabled, the color functions do nothing. You can override this with a command-line flag: ```bash node myapp.js --no-color +node myapp.js --color=false + +node myapp.js --color +node myapp.js --color=true +node myapp.js --color=always + +FORCE_COLOR=1 node myapp.js +``` + +Or in code: + +```javascript +var colors = require('colors'); +colors.enable(); +colors.disable(); ``` ## Console.log [string substitution](http://nodejs.org/docs/latest/api/console.html#console_console_log_data) |