has-color

Detect whether a terminal supports color

Renamed to `supports-color`
Last updated 7 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install has-color 
SYNC missed versions from official npm registry.

has-color Build Status

Detect whether a terminal supports color.

Used in the terminal color module chalk.

Install

$ npm install --save has-color

Usage

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

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

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

License

MIT © Sindre Sorhus

Current Tags

  • 0.2.0                                ...           latest (7 years ago)

9 Versions

  • 0.2.0 [deprecated]           ...           7 years ago
  • 0.1.7                                ...           11 years ago
  • 0.1.6                                ...           11 years ago
  • 0.1.5                                ...           11 years ago
  • 0.1.4                                ...           11 years ago
  • 0.1.3                                ...           11 years ago
  • 0.1.2                                ...           11 years ago
  • 0.1.1                                ...           11 years ago
  • 0.1.0                                ...           11 years ago
Maintainers (1)
Downloads
Total 9
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (1)
Dependents (3)

© 2010 - cnpmjs.org x YWFE | Home | YWFE