Back to Explore

chalk/supports-color

GitHub
1 watchersOpen source

Last release: 2025-09-08

supports-color is an npm module that detects whether a terminal supports ANSI color output for stdout and stderr, returning an object with per-stream flags (basic 16 colors, 256 colors, and truecolor 16 million). It also provides a helper to evaluate support for an arbitrary write stream and honors CLI flags like --color/--no-color, plus FORCE_COLOR to override detection.

Project status

  • Actively maintained (mostly), the upstream pushed on 2026-01-04, and there were multiple updates in 2025 that adjusted terminal and environment detection (WezTerm, Ghostty), indicating ongoing upkeep.
  • Apparent update cadence: fairly steady in Aug to Sep 2025 (v10.1.0 on 2025-08-03, v10.2.0 on 2025-08-17, v10.2.2 on 2025-09-08). Since then, there are no listed updates through 2026-06-11, suggesting a slowdown or quiet period despite the earlier upstream push.

AI summary generated 2026-06-11

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v10.2.2

    2025-09-08

    Release v10.2.2 is described as a vulnerability fix for the preceding v10.2.1 release. However, the provided code diff shows only a package.json version bump and does not include any actual source or dependency changes.

    Security
  • v10.2.0

    2025-08-17

    This release updates the terminal color detection logic so that WezTerm is treated as supporting true color. The only code change is a new environment check in the color support detection function, and the package version is bumped to v10.2.0.

  • v10.1.0

    2025-08-03

    Release v10.1.0 updates the `supports-color` detection logic to treat the Ghostty terminal as supporting true color. The only code change adds a targeted environment check for `TERM=xterm-ghostty`, returning the highest color support level.

    Features
  • v10.0.0

    2024-12-18

    v10.0.0 primarily bumps the supported Node.js version to Node 18 and updates CI configuration. The code diff also includes additional behavior changes in how color support is detected in CI environments and how FORCE_COLOR is interpreted, none of which are described in the release notes.

    Breaking
  • v9.4.0

    2023-06-28

    v9.4.0 adds detection for Gitea Actions by treating the `GITEA_ACTIONS` environment variable similarly to `GITHUB_ACTIONS` for color support level selection. The release notes mention this change, and the code and tests reflect it.

    Features
  • v9.3.1

    2022-12-15

    v9.3.1 is a small patch release of supports-color with release notes stating it fixes Node.js 12 compatibility. The code changes are minimal and primarily adjust syntax related to argument detection, plus a dev tooling bump.

  • v9.3.0

    2022-12-07

    v9.3.0 adds environment-specific true-color detection for Kitty terminals and GitHub Actions, and improves Deno compatibility when reading CLI arguments. The code diff also includes additional detection logic changes (notably in browser support heuristics) that are not covered by the release notes.

    Features
  • v9.2.3

    2022-09-07

    Release v9.2.3 focuses on a TypeScript definition fix for the supports-color package. The change modifies the typings for createSupportsColor and updates the type-test expectations accordingly.

  • v9.2.2

    2022-03-28

    Release v9.2.2 makes a small change to browser detection logic to better identify Chromium-based browsers. The published release notes only state that browser detection was improved, without detailing the implementation change.

  • v9.2.1

    2021-11-26

    This release adds missing TypeScript type exports for the browser build of the supports-color package. The code changes are limited to introducing a new browser.d.ts file and ensuring it is included in the published package files list.

    Features