---
title: "ansi-styles 7.0.0 Breaking Changes on npm | Since.dev"
description: "What each ansi-styles release removed, renamed or changed: 20 breaking changes in 6 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/ansi-styles
last_updated: 2026-12-04
---

# ansi-styles breaking changes

ansi-styles 7.0.0 (July 26, 2026) is its newest release with breaking changes, 3 of them. The first: ansi-styles 7.0.0 requires Node.js 22 or later. Every breaking API change we have recorded in ansi-styles on npm: 20 breaking changes in 6 versions. Below, its 6 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `7.0.0`, released July 26, 2026. [Source repository](https://github.com/chalk/ansi-styles)

Its 7.0.0 release requires [Node.js 22](https://since.dev/calendar/nodejs/22.md) or later. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [6.2.3](#v-6-2-3) to [7.0.0](#v-7-0-0): 3 breaking changes in 1 version.
- From [4.0.0](#v-4-0-0) to [7.0.0](#v-7-0-0): 19 breaking changes in 5 versions.

## ansi-styles 7.0.0 breaking changes

ansi-styles 7.0.0, released July 26, 2026: 3 breaking changes.

- **Configuration changed**  

The package now requires Node.js 22. Users on older Node.js versions must upgrade Node.js before upgrading this package. [github.com](https://github.com/chalk/ansi-styles/releases/tag/v7.0.0)
- **Signature changed** `default`  

Was const ansiStyles: {readonly modifier: Modifier; readonly color: ColorBase & ForegroundColor; readonly bgColor: ColorBase & BackgroundColor; readonly codes: ReadonlyMap\<number, number>;} & ForegroundColor & BackgroundColor & Modifier &... [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/7.0.0)
- **Signature changed** `Modifier`  

Was type Modifier = {readonly reset: CSPair; readonly bold: CSPair; readonly dim: CSPair; readonly italic: CSPair; readonly underline: CSPair; readonly overline: CSPair; readonly inverse: CSPair; readonly hidden: CSPair; readonly... [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/7.0.0)

## ansi-styles 6.2.3 breaking changes

ansi-styles 6.2.3, released September 8, 2025: 6 breaking changes.

- **Signature changed** `BackgroundColor`  

Was interface BackgroundColor; now type BackgroundColor = {readonly bgBlack: CSPair; readonly bgRed: CSPair; readonly bgGreen: CSPair; readonly bgYellow: CSPair; readonly bgBlue: CSPair; readonly bgCyan: CSPair; readonly bgMagenta: CSPair... [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/6.2.3)
- **Signature changed** `ColorBase`  

Was interface ColorBase; now type ColorBase = {readonly close: string; ansi(code: number): string; ansi256(code: number): string; ansi16m(red: number, green: number, blue: number): string;}. [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/6.2.3)
- **Signature changed** `ConvertColor`  

Was interface ConvertColor; now type ConvertColor = {rgbToAnsi256(red: number, green: number, blue: number): number; hexToRgb(hex: string): \[red: number, green: number, blue: number\]; hexToAnsi256(hex: string): number; ansi256ToAnsi(code... [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/6.2.3)
- **Signature changed** `CSPair`  

Was interface CSPair; now type CSPair = {readonly open: string; readonly close: string;}. [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/6.2.3)
- **Signature changed** `ForegroundColor`  

Was interface ForegroundColor; now type ForegroundColor = {readonly black: CSPair; readonly red: CSPair; readonly green: CSPair; readonly yellow: CSPair; readonly blue: CSPair; readonly cyan: CSPair; readonly magenta: CSPair; readonly... [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/6.2.3)
- **Signature changed** `Modifier`  

Was interface Modifier; now type Modifier = {readonly reset: CSPair; readonly bold: CSPair; readonly dim: CSPair; readonly italic: CSPair; readonly underline: CSPair; readonly overline: CSPair; readonly inverse: CSPair; readonly hidden... [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/6.2.3)

## ansi-styles 6.0.0 breaking changes

ansi-styles 6.0.0, released April 16, 2021: 3 breaking changes.

- **Removed**  

The release requires Node.js 12 or later, so older Node.js versions are no longer supported. Upgrade Node.js before using this version. [github.com](https://github.com/chalk/ansi-styles/releases/tag/v6.0.0)
- **Behavior changed**  

The package is now pure ES modules and can no longer be loaded with CommonJS require(). Switch to import, or follow the linked guide for migrating. [github.com](https://github.com/chalk/ansi-styles/releases/tag/v6.0.0)
- **Signature changed** `default`  

Was const ansiStyles: {readonly modifier: ansiStyles.Modifier; readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; readonly codes: ReadonlyMap\<number... [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/6.0.0)

## ansi-styles 5.2.0 breaking changes

ansi-styles 5.2.0, released March 31, 2021: 1 breaking change.

- **Behavior changed**  

The color conversion functions are no longer enumerable properties of the package exports. Code that enumerates or spreads these properties may see different results. [github.com](https://github.com/chalk/ansi-styles/releases/tag/v5.2.0)

## ansi-styles 5.0.0 breaking changes

ansi-styles 5.0.0, released December 1, 2020: 6 breaking changes.

- **Removed**  

The hsv, hwb, ansi and CSS keyword color types are no longer supported. If you need them, use color-convert instead. [github.com](https://github.com/chalk/ansi-styles/releases/tag/v5.0.0)
- **Removed** `ColorBase.ansi`  

ColorBase.ansi was removed in ansi-styles 5.0.0 [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/5.0.0)
- **Removed** `ColorConvert`  

ColorConvert was removed in ansi-styles 5.0.0 [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/5.0.0)
- **Signature changed** `ColorBase.ansi16m`  

Was readonly ansi16m: ColorConvert; now ansi16m(red: number, green: number, blue: number): string. [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/5.0.0)
- **Signature changed** `ColorBase.ansi256`  

Was readonly ansi256: ColorConvert; now ansi256(code: number): string. [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/5.0.0)
- **Signature changed** `default`  

Was const ansiStyles: {readonly modifier: ansiStyles.Modifier; readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase; readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase; readonly codes: ReadonlyMap\<number... [npmjs.com](https://www.npmjs.com/package/ansi-styles/v/5.0.0)

## ansi-styles 4.0.0 breaking changes

ansi-styles 4.0.0, released May 31, 2019: 1 breaking change.

- **Removed**  

The release now requires Node.js 8, so older Node.js versions are no longer supported and users must run Node.js 8 or newer. [github.com](https://github.com/chalk/ansi-styles/releases/tag/v4.0.0)

## Related packages

- [ansi-regex](https://since.dev/packages/npm/ansi-regex.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
