1 # supports-color [![Build Status](https://travis-ci.org/chalk/supports-color.svg?branch=master)](https://travis-ci.org/chalk/supports-color)
3 > Detect whether a terminal supports color
9 $ npm install --save supports-color
16 var supportsColor = require('supports-color');
19 console.log('Terminal supports color');
23 It obeys the `--color` and `--no-color` CLI flags.
25 For situations where using `--color` is not possible, add an environment variable `FORCE_COLOR` with any value to force color. Trumps `--no-color`.
30 - [supports-color-cli](https://github.com/chalk/supports-color-cli) - CLI for this module
31 - [chalk](https://github.com/chalk/chalk) - Terminal string styling done right
36 MIT © [Sindre Sorhus](http://sindresorhus.com)