summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/npmlog/node_modules/gauge/node_modules/supports-color/readme.md
blob: 7f07e5fb0f5267951a6914f1de02cbe8a9267678 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# supports-color [![Build Status](https://travis-ci.org/sindresorhus/supports-color.svg?branch=master)](https://travis-ci.org/sindresorhus/supports-color)

> Detect whether a terminal supports color


## Install

```sh
$ npm install --save supports-color
```


## Usage

```js
var supportsColor = require('supports-color');

if (supportsColor) {
	console.log('Terminal supports color');
}
```

It obeys the `--color` and `--no-color` CLI flags.


## CLI

```sh
$ npm install --global supports-color
```

```sh
$ supports-color --help

Usage
  $ supports-color

# Exits with code 0 if color is supported and 1 if not
```


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)