tiny-terminal-colors
v1.0.1
Published
A simple ANSI styling library for terminal colors
Maintainers
Readme
tiny-terminal-colors
A minimal and zero-dependency Node.js library to style your terminal output with ANSI escape codes. Supports foreground colors, background colors, bold, and underline — like a mini chalk.
📦 Installation
npm install tiny-terminal-colors🚀 Usage
const color = require('tiny-terminal-colors');
console.log(color.red("This is red text"));
console.log(color.bgYellow("Text with yellow background"));
console.log(color.green(color.bgBlack("Green on black")));
console.log(color.bold(color.underline(color.cyan("Bold Underlined Cyan"))));🎨 Supported Styles
✅ Text Colors (Foreground)
blackredgreenyellowbluemagentacyanwhitegray
✅ Background Colors
bgBlackbgRedbgGreenbgYellowbgBluebgMagentabgCyanbgWhite
✅ Text Styles
boldunderline
🧪 Testing
npm test❗ Notes
- Styles do not chain automatically. You can nest them like this:
color.bold(color.bgRed(color.white("Bold White on Red"))) - This library uses standard ANSI escape codes. It works in most terminals.
📄 License
MIT © 2025 Abhay Patel
