tiny-colors

Add ANSI colors to terminal output in your code.

npmmacoslinuxwindows
Try with needOr install directly
Source

About

A tiny library providing the basic ANSI colors for the terminal.

Examples

print colored text in terminal$ npm install tiny-colors && node -e "const c = require('tiny-colors'); console.log(c.red('Error message'))"
highlight output with different colors$ node -e "const {red, green, blue} = require('tiny-colors'); console.log(green('Success'), red('Failed'), blue('Info'))"
style log messages with background colors$ node -e "const c = require('tiny-colors'); console.log(c.bgYellow(c.black('Warning')))"
combine multiple colors in one line$ node -e "const c = require('tiny-colors'); console.log(c.red('●') + ' ' + c.green('Online'))"
create bold and bright text output$ node -e "const c = require('tiny-colors'); console.log(c.bold(c.cyan('Important')))"