Skip to content

lukasreinfurt/has-color

 
 

Repository files navigation

has-color Build Status

Detect whether a terminal supports color.

Used in the terminal color module chalk.

Install

Install with npm: npm install --save has-color

Example

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

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

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

License

MIT © Sindre Sorhus

About

Detect whether a terminal supports color - Node.js module

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%