summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/node-gyp/node_modules/npmlog/node_modules/gauge/node_modules/has-color/readme.md
blob: 37bbd8991a64235c55794f75cfbfae57257b6ee6 (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
# has-color [![Build Status](https://travis-ci.org/sindresorhus/has-color.svg?branch=master)](https://travis-ci.org/sindresorhus/has-color)

> Detect whether a terminal supports color.

Used in the terminal color module [chalk](https://github.com/sindresorhus/chalk).


## Install

```bash
$ npm install --save has-color
```


## Usage

```js
var hasColor = require('has-color');

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

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


## License

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