This package has been deprecated

Author message:

Renamed to `supports-color`

has-color

0.2.0 • Public • Published

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

Dependencies (0)

    Dev Dependencies (1)

    Package Sidebar

    Install

    npm i has-color

    Weekly Downloads

    390,850

    Version

    0.2.0

    License

    MIT

    Unpacked Size

    2.95 kB

    Total Files

    4

    Last publish

    Collaborators

    • sindresorhus