farben

1.1.0 • Public • Published

Build Status farben

A small library for adding some color to your CLIs.

Install

$ npm install farben

Usage

const farben = require('farben');

console.log(farben('unicorns', 'magenta'));
//=> 'unicorns' (in magenta)

API

farben(text, style)

text

Type: string

style

Type: string, array

How text should be styled.

Supported styles
  • reset
  • bold
  • italic
  • underline
  • fontDefault
  • font2
  • font3
  • font4
  • font5
  • font6
  • imageNegative
  • imagePositive
  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • gray
  • bg-black
  • bg-red
  • bg-green
  • bg-yellow
  • bg-blue
  • bg-magenta
  • bg-cyan
  • bg-white
  • bg-gray

License

MIT © Tobias Herber

Package Sidebar

Install

npm i farben

Weekly Downloads

2

Version

1.1.0

License

MIT

Last publish

Collaborators

  • tobihrbr