2.0.0
Chalk is a Node.js module for styling and colorizing terminal output.
Two years ago, @Qix- asked me about adding 256/Truecolor support to Chalk. He soon after joined the Chalk team. And now we’re finally able to ship Truecolor support in Chalk!
Chalk has had an immense growth since the 1.0.0 release in 2015. It's now trusted by more than 17.000 packages, up from 3000, and it's the 5th most depended upon package on npm.
Highlights
Breaking changes
- Requires Node.js 4 or later.
- Removed
chalk.hasColor()
. Use thehas-ansi
package directly instead. 04cae22 - Removed
chalk.stripColor()
. Use thestrip-ansi
package directly instead. 04cae22 - Removed
chalk.styles
. Use theansi-styles
package directly instead. 8702496
256/Truecolor support
Chalk now supports 256 colors and Truecolor (16 million colors). Terminal apps like Hyper and iTerm supports Truecolor, enabling you to create really immersive CLI experiences. Chalk is smart enough to downsample the colors to whatever the terminal supports, so you can use any colors without having to think whether it's supported or not.
Tagged template literal
Chalk now ships with a tagged template literal that makes it much nicer to create long strings with lots of different styling.
const name = 'Sindre';
console.log(chalk`{bold Hello ${name}}`);
Other
- Added bright color variants. chalk/ansi-styles@d1d855e
- Fixed a bleed issue on macOS. 05f87e2
- Added support for 256 color output on Windows 10 build 10586 or newer. chalk/supports-color@340588e
All changes
Made with ♥ by Josh, Sindre, and all our wonderful contributors.