Menu

Add color to the console in Node.js

February 10, 2018 - Node.js

Package on npm

Installation

npm install --save-dev colors

Usage

var colors = require('colors/safe');
var volume = " ▁ ▂ ▃ ▄ ▅ ▆ █"
console.log(colors.rainbow(volume));
console.log(colors.yellow.bold(`Color!`));
console.log(colors.green('OK'));
console.log(colors.red.bold('Error'));

Other packages

Tags: