← All repos

supports-color

Detect whether a terminal supports color

Browse cluster: Terminal & CLI Output Styling
205commits
44contributors
2languages

Tech stack & purpose

Supports-color is a Node.js package that detects whether a terminal supports color output and at what level (basic 16-color, 256-color, or truecolor with 16 million colors). The package is built for JavaScript and installed via npm, providing both a default export for testing stdout and stderr streams and a named `createSupportsColor` function for custom stream evaluation. It respects CLI flags like `--color` and `--no-color` as well as the `FORCE_COLOR` environment variable to override or force color support detection. The project is maintained by Sindre Sorhus and Josh Junon.

Languages

JavaScript
97.3%
TypeScript
2.7%

Contributors (top 30 of 44)