Chalk 5 is ESM. If you want to use Chalk with TypeScript or a build tool, you will probably want to use Chalk 4 for now. Chalk comes with an easy to use composable API where you just chain and nest the styles you want. Chain styles and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that chalk.red.yellow.green is equivalent to chalk.green. Color support is automatically detected, but you can override it by setting the level property. You should however only do this in your own code as it applies globally to all Chalk consumers. Detect whether the terminal supports color. Used internally and handled for you, but exposed for convenience. chalkStderr contains a separate instance configured with color support detected for stderr stream instead of stdout. Override rules from supportsColor apply to this too. supportsColorStderr is exposed for convenience.

Features

  • Expressive API
  • Highly performant
  • No dependencies
  • Ability to nest styles
  • Auto-detects color support
  • 256/Truecolor color support

Project Samples

Project Activity

See All Activity >

Categories

Terminals, Design

License

MIT License

Follow Chalk

Chalk Web Site

Other Useful Business Software
AI-powered service management for IT and enterprise teams Icon
AI-powered service management for IT and enterprise teams

Enterprise-grade ITSM, for every business

Give your IT, operations, and business teams the ability to deliver exceptional services—without the complexity. Maximize operational efficiency with refreshingly simple, AI-powered Freshservice.
Try it Free
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Chalk!

Additional Project Details

Operating Systems

Windows

Programming Language

JavaScript

Related Categories

JavaScript Terminals, JavaScript Design Software

Registered

2022-05-11