supports-color 1.3.1

Detect whether a terminal supports color

Homepage: https://github.com/sindresorhus/supports-color

Platform: npm

Language: JavaScript

License: MIT

View on registry: https://www.npmjs.com/package/supports-color/

Install: npm install supports-color


supports-color Build Status

Detect whether a terminal supports color

Install

$ npm install --save supports-color

Usage

var supportsColor = require('supports-color');
if (supportsColor) {
 console.log('Terminal supports color');
}

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

For situations where using --color is not possible, add an environment variable FORCE_COLOR with any value to force color. Trumps --no-color.

CLI

$ npm install --global supports-color
$ supports-color --help
 Usage
 supports-color
 Exits with code 0 if color is supported and 1 if not

License

MIT © Sindre Sorhus

веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей

GitHub Repository

sindresorhus/supports-color sindresorhus/supports-color

Detect whether a terminal supports color

Language: JavaScript

Created: August 03, 2013 00:01

Last updated: March 17, 2015 02:25

Last pushed: March 16, 2015 10:58

Size: 390 KB

Stars: 27

Forks: 7

Watchers: 5

Open issues: 2

Top Contributors

Sindre Sorhus Joshua Appelman Maxime Tricoire Sune Simonsen

Releases

  • 1.3.1 - March 16, 2015 10:58
  • 1.3.0 - February 23, 2015 06:58
  • 1.2.1 - February 22, 2015 09:28
  • 1.2.0 - October 12, 2014 21:36
  • 1.1.0 - August 19, 2014 23:31
  • 1.0.0 - August 13, 2014 16:35
  • 0.2.0 - June 14, 2014 01:45

Related Projects

supports_color 0.1.0
Detect whether the current terminal supports color. This is a dart port of the https://www.npmjs...
Pub - Dart - Updated 3 months ago
chalk 1.0.0
Terminal string styling done right. Much color.
npm - JavaScript - MIT - Updated about 1 month ago - 1,652 stars
has-color 0.1.7
Detect whether a terminal supports color
npm - JavaScript - MIT - Updated 12 months ago - 27 stars
is-hex-color 0.0.1
Check whether a string is a hex color.
npm - JavaScript - Published over 1 year ago - 2 stars
is-hsl-color 0.0.1
Loosely check whether a string is an HSL(A) color string.
npm - JavaScript - Published over 1 year ago
веселые картинки развлекательные гифки интресные факты смешные видео смешные истории из соцсетей