npm / chalk
chalk
What changed in chalk 2 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
29 breaking8 new APIs and options4 performance5 behavior and defaults2 tooling8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initchalk 67 changes
Breaking changes 3
At color level 1, ansi256() is downsampled to 16 colors.
At color level 1, bgAnsi256() is downsampled to 16 colors.
Chalk now requires Node.js 22.
New APIs and options 1
Adds underline styles and underline colors.
Performance 1
Improves performance.
Behavior and default changes 1
A numeric FORCE_COLOR value is now treated as an exact color level.
Fixes and other changes 1
Fixes inconsistent coercion of two arguments.
chalk 516 changes
Breaking changes 13
The .ansi() coloring method was removed; the notes suggest using color-convert to achieve the same result.
The class formerly accessed as chalk.Instance is now a named export, Chalk.
Tagged template literal support moved to the separate chalk-template package.
Chalk no longer has any dependencies.
The stderr instance formerly accessed as chalk.stderr is now a named export.
The .hsl() coloring method was removed; the notes suggest using color-convert to achieve the same result.
The .hsv() coloring method was removed; the notes suggest using color-convert to achieve the same result.
The .hwb() coloring method was removed; the notes suggest using color-convert to achieve the same result.
The .keyword() coloring method was removed; the notes suggest using color-convert to achieve the same result.
Chalk is now pure ESM; bundlers must support ESM and be configured for it.
The value formerly accessed as chalk.supportsColor is now a named export.
The value formerly accessed as chalk.stderr.supportsColor is now a named export.
Using Chalk with TypeScript requires TypeScript 4.7 or later.
New APIs and options 1
Added the overline style.
Performance 1
The install size is less than half of v4.
Fixes and other changes 1
Function prototype methods are now preserved.
chalk 42 changes
Breaking changes 2
The TypeScript type changes from an enum to a union; compare chalk.level to a number instead of Level.None.
Node.js 10 is now required.
chalk 323 changes
Breaking changes 8
The Windows-specific
bluecolor workaround was removed because newer Windows 10 builds fixed the issue.The
.enabledproperty was removed; use.level > 0to detect color support.Use
chalk.Instance()instead ofchalk.constructor()to create an instance.The Windows-specific
dimstyle workaround was removed because newer Windows 10 builds fixed the issue.The built-in Flow type definition was dropped; the notes point users to flow-typed for types.
Node.js 8 is now required.
The TypeScript type
ChalkOptionswas renamed toOptions.The TypeScript definition now uses a CommonJS-compatible export; use
import chalk = require('chalk').
New APIs and options 3
Added the
blackBrightcolor, which is the same asgrayand provides consistency.TypeScript types for colors and modifiers are now exported.
The environment variable can now force a certain color level.
Performance 2
Performance was massively improved.
Require speed was improved, reducing the time it takes to import Chalk.
Behavior and default changes 3
Color detection now supports GitHub Actions.
TERM=dumbnow has higher priority in color detection.Color detection now supports VT220.
Tooling 2
Added
ansiandbgAnsito the TypeScript declaration.Added
ansi256andbgAnsi256to the TypeScript declaration.
Fixes and other changes 5
Support for bracketed Unicode escapes in template literals was fixed.
Fixed the TypeScript type for
chalk.supportsColor.The TypeScript
const enumissue was fixed.Support for nested styles was fixed.
The TypeScript type now accepts
unknowninstead of onlystringfor a tagged template literal argument.
chalk 28 changes
Breaking changes 3
Removed chalk.hasColor(); use the has-ansi package directly instead.
Removed chalk.stripColor(); use the strip-ansi package directly instead.
Removed chalk.styles; use the ansi-styles package directly instead.
New APIs and options 3
Chalk now supports 256 colors and Truecolor, and downsamples colors to whatever the terminal supports.
Added bright color variants.
Chalk now ships with a tagged template literal for creating long strings with different styling.
Behavior and default changes 1
Added support for 256 color output on Windows 10 build 10586 or newer.
Fixes and other changes 1
Fixed a bleed issue on macOS.