add support for FORCE_COLOR environment variable to force color

https://github.com/sindresorhus/supports-color/pull/18
This commit is contained in:
Sindre Sorhus 2015-02-23 14:03:03 +07:00
parent e520cec3e1
commit 19935d6484
2 changed files with 3 additions and 5 deletions

View file

@ -99,11 +99,9 @@ var ctx = new chalk.constructor({enabled: false});
### chalk.supportsColor
Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color).
Detect whether the terminal [supports color](https://github.com/sindresorhus/supports-color). Used internally and handled for you, but exposed for convenience.
Can be overridden by the user with the flags `--color` and `--no-color`.
Used internally and handled for you, but exposed for convenience.
Can be overridden by the user with the flags `--color` and `--no-color`. For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
### chalk.styles