color-console.js
v2.6.0
Published
This Node.js module is used to colorize console outputs and apply various styles.
Downloads
11
Readme
Color Formatting Module
This Node.js module is used to colorize console outputs and apply various styles.
Usage
After adding the module to your project, you can use it as shown below:
const color = require('color-console.js'); // Update the module name here
console.log(color.red("This text will appear in red."));
console.log(color.bold("This text will appear in bold."));
console.log(color.rainbow("This text will appear in rainbow colors."));
// Other color and style options can also be used.
Color and Style Options
red(text)
: Displays text in red color.green(text)
: Displays text in green color.blue(text)
: Displays text in blue color.yellow(text)
: Displays text in yellow color.magenta(text)
: Displays text in magenta color.cyan(text)
: Displays text in cyan color.white(text)
: Displays text in white color.black(text)
: Displays text in black color.grey(text)
: Displays text in grey color.bold(text)
: Displays text in bold style.italic(text)
: Displays text in italic style.rainbow(text)
: Displays text in rainbow colors.
Examples
const color = require('color-console.js'); // Update the module name here
console.log(color.red("Red text"));
console.log(color.bold("Bold text"));
console.log(color.rainbow("Rainbow text"));