How to use the supportsColor function from chalk
Find comprehensive JavaScript chalk.supportsColor code examples handpicked from public code repositorys.
GitHub: kevva/chalk
146 147 148 149 150 151 152 153 154 155
0. All colors disabled 1. Basic color support (16 colors) 2. 256 color support 3. Truecolor support (16 million colors) ### chalk.supportsColor Detect whether the terminal [supports color](https://github.com/chalk/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`. For situations where using `--color` is not possible, add the environment variable `FORCE_COLOR=1` to forcefully enable color or `FORCE_COLOR=0` to forcefully disable. The use of `FORCE_COLOR` overrides all other color support checks.
837
2
4
+ 3 other calls in file