Skip to content

v1.0.0

Latest

Choose a tag to compare

@davidcralph davidcralph released this 01 Nov 21:19
ba4cd40

Breaking changes

  • Requires Node.js 22+
  • Styles close with their own code instead of a full reset (\x1b[0m), so nesting works: red('a ' + bold('b') + ' c') keeps c red
  • eightBit() / eightBitBg() take a number

New

  • Ships ESM and CommonJS, with generated types
  • FORCE_COLOR support (FORCE_COLORS still works)
  • 3-digit hex (#fff) in hex(), hexBg() and short()

Fixes

  • FORCE_COLOR=0 now disables colours
  • Empty NO_COLOR is ignored, per no-color.org
  • short() codes are case-insensitive
  • alias() type accepts 'styles'