🦄 A simple text coloring for nodejs logs
npm install cli-coloring
# or
yarn add cli-coloring
const clr = require("cli-coloring")
available styles:
- bold
- dim
- italic
- underline
- inverse
- strike
- hidden
console.log("bold text: ", clr.bold("Whatever world."))
// or
console.log("dim text".dim())
available colors:
- white
- grey
- black
- blue
- cyan
- green
- magenta
- red
- yellow
console.log("white text:", clr.white("Whatever world."))
// or
console.log("black text: ", "Whatever world.".black())
available bg colors:
- bg_white
- bg_grey
- bg_black
- bg_blue
- bg_cyan
- bg_green
- bg_magenta
- bg_red
- bg_yellow
console.log("cyan background: ", clr.bg_cyan("Whatever world."))
// or
console.log("green background: ", "Whatever world.".bg_green())
console.log("italic underline text: ", clr.italic(clr.underline("Whatever world.")))
// or
console.log("red bold blue background:", "Whatever World.".red().bold().bg_blue())
Feel free to raise an Issue or submit a PR.
Code copyright 2020 AM-77. Code released under MIT license.