micro-colors
v1.0.1
Published
Tiny, zero-dependency ANSI console styling and terminal coloring API.
Maintainers
Readme
micro-colors
Why use micro-colors? Styling CLI console strings with ANSI codes requires parsing strings. Existing dependencies like chalk or kleur are large and have complex API options.
A tiny console coloring utility supporting chainable, nested, and lightweight ANSI escape integrations.
⚡ Features
- Zero dependencies, ultra-light footprint
- Supports nested styles
- Exposes standard colors and modifiers
📦 Installation
npm i micro-colors🚀 Usage
import colors from 'micro-colors';
console.log(colors.green('Success!'));
console.log(colors.red('Error: ' + colors.bold('Fatal')));⚙️ API Reference
colors.(str)
- Modifier styles: bold, dim, italic, underline, inverse, hidden, strikethrough.
- Foreground styles: black, red, green, yellow, blue, magenta, cyan, white, gray.
📺 Demonstration

📄 License
MIT License.
