0.0.8 • Published 10 months ago
@jrc03c/bash-colors v0.0.8
Intro
bash-colors is a little package for Node for printing text in colors. It's like chalk, only less well-made.
Installation
npm install --save @jrc03c/bash-colorsUsage
const color = require("@jrc03c/bash-colors")
console.log(color.fg.red("Hello, world!"))API
All of the following are callable as functions that take a single string argument and return that argument wrapped in Bash color codes. You'll usually want to console.log the return value.
Text modifications:
color.fx.reset
color.fx.bright
color.fx.dim
color.fx.underscore
color.fx.blink
color.fx.reverse
color.fx.hiddenForeground colors:
color.fg.black
color.fg.red
color.fg.green
color.fg.yellow
color.fg.blue
color.fg.magenta
color.fg.cyan
color.fg.whiteBackground colors:
color.bg.black
color.bg.red
color.bg.green
color.bg.yellow
color.bg.blue
color.bg.magenta
color.bg.cyan
color.bg.white