Detect whether a terminal supports color
Browse cluster: Terminal & CLI Output Styling →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.