femtocolors
v0.1.2
Published
A tiny, zero-dependency library for styling terminal text
Downloads
38
Maintainers
Readme
femtocolors
A tiny, zero-dependency library for styling terminal text
- 130 bytes, total install size <2 KB
- Convenient chaining API
- Respects
NO_COLOR - Fully typed
- Supports all
styleText()styles - Node.js ≥20 only (see picocolors for other runtimes)
Usage
import fmt from 'femtocolors';
// Style by chaining properties
const success = fmt.green('Success!');
const error = fmt.black.bgRed('Error');
const link = fmt.blue.underline('https://example.com');
// You can also reuse formatters
const errorStyle = fmt.red.bold;
errorStyle('Error 1');
errorStyle('Error 2');License
MIT License © Copyright (c) 2025 Chris Swithinbank
