README
cli-coloring
🦄 A simple text coloring for nodejs logs
Installation
npm install cli-coloring
# or
yarn add cli-coloring
Usage:
Importing The Package:
const clr = require("cli-coloring")
Text Styling:
available styles:
- bold
- dim
- italic
- underline
- inverse
- strike
- hidden
console.log("bold text: ", clr.bold("Whatever world."))
// or
console.log("dim text".dim())
Text Coloring:
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())
Background Coloring:
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())
Nested options:
console.log("italic underline text: ", clr.italic(clr.underline("Whatever world.")))
// or
console.log("red bold blue background:", "Whatever World.".red().bold().bg_blue())
What Should You Get Somthing Like:
Contribution
Feel free to raise an Issue or submit a PR.
Copyright and license
Code copyright 2020 AM-77. Code released under MIT license.