supports-color reliably detects whether a TTY (teletypewriter) supports color. It examines environment variables like TERM and flags passed to Node.js to determine color support levels: basic (16 colors), ANSI 256 colors, or truecolor (16 million colors). This package is instrumental in allowing command-line applications to tailor their output for optimal user experience, ensuring accessibility and visual appeal across diverse terminal environments. It uses logic from many projects like chalk, and ansi-styles.
The supports-color npm package has had an irregular release frequency since its initial release in 2014. Releases were most frequent in 2015 and 2017, with periods of inactivity in other years. There were no releases between January 2024 and November 2024. Two versions were released in August 2025.
"supports-color" npm package downloads show a generally increasing trend from March 2024, peaking in October 2024. There was a drop around December 2024. Downloads recovered through June 2025 before decreasing towards August 2025. September 2025 shows a very high download number, but incomplete data should be considered.