https://github.com/chalk/supports-color-cli
Detect whether a terminal supports color
https://github.com/chalk/supports-color-cli
Last synced: about 1 year ago
JSON representation
Detect whether a terminal supports color
- Host: GitHub
- URL: https://github.com/chalk/supports-color-cli
- Owner: chalk
- License: mit
- Created: 2015-06-30T23:09:31.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2021-04-16T08:19:47.000Z (about 5 years ago)
- Last Synced: 2025-06-27T00:19:02.285Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 18
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# supports-color-cli
> Detect whether a terminal supports color
## Install
```
$ npm install --global supports-color-cli
```
## Usage
```
$ supports-color --help
Usage
$ supports-color
Options
--256 Check for 256 color support
--16m Check for 16 million color support
Examples
$ supports-color
$ supports-color --256
$ supports-color --16m
Exits with code 0 if color is supported and 1 if not
```
## Related
- [supports-color](https://github.com/chalk/supports-color) - API for this module
## Maintainers
- [Sindre Sorhus](https://github.com/sindresorhus)
- [Josh Junon](https://github.com/qix-)