This package has been deprecated

Author message:

I recommend using ansi-colors instead of this package

node-coolors

1.0.4-rev1 • Public • Published

node-coolors

Simple way to add colors to node console.


License: MIT npm version Build Status


Usage

Using Functions

const coolors = require('node-coolors')
console.log(coolors.fgRed('Red Text'))
console.log(coolors.bgGreen('Text with green background'))

Using Properties

const coolors = require('node-coolors')
console.log(`${coolors._fgRed}Red Text${coolors._reset}`)
console.log(`${coolors._bgGreen}Text with green background${coolors._reset}`)

Result

Concatenate colors

const coolors = require('node-coolors')
console.log(coolors.fgRed(coolors.bgWhite('Red Text with white background')))
console.log(coolors.bgGreen(coolors.fgBlack('black text with green background')))

Result

Properties List

  • _reset

    Reset to default output, used after each function call.

  • _bright

    Bright text

  • _dim

    Dimmed text

  • _underscore

    Underlined text

  • _blink

    Blink text

  • _reverse

    Reverse colors

  • _hidden

    Invisible text

  • _fgBlack

    Black text

  • _fgRed

    Red text

  • _fgGreen

    Green text

  • _fgYellow

    Yellow text

  • _fgBlue

    Blue text

  • _fgMagenta

    Magenta text

  • _fgCyan

    Cyan text

  • _fgWhite

    White text

  • _bgBlack

    Black background

  • _bgRed

    Red background

  • _bgGreen

    Green background

  • _bgYellow

    Yellow background

  • _bgBlue

    Blue background

  • _bgMagenta

    Magenta background

  • _bgCyan

    Cyan background

  • _bgWhite

    White background

Methods List

  • reset(text)

    Reset to default output, used after each function call.

  • bright(text)

    Bright text

  • dim(text)

    Dimmed text

  • underscore(text)

    Underlined text

  • blink(text)

    Blink text

  • reverse(text)

    Reverse colors

  • hidden(text)

    Invisible text

  • fgBlack(text)

    Black text

  • fgRed(text)

    Red text

  • fgGreen(text)

    Green text

  • fgYellow(text)

    Yellow text

  • fgBlue(text)

    Blue text

  • fgMagenta(text)

    Magenta text

  • fgCyan(text)

    Cyan text

  • fgWhite(text)

    White text

  • bgBlack(text)

    Black background

  • bgRed(text)

    Red background

  • bgGreen(text)

    Green background

  • bgYellow(text)

    Yellow background

  • bgBlue(text)

    Blue background

  • bgMagenta(text)

    Magenta background

  • bgCyan(text)

    Cyan background

  • bgWhite(text)

    White background

Readme

Keywords

Package Sidebar

Install

npm i node-coolors

Weekly Downloads

0

Version

1.0.4-rev1

License

ISC

Unpacked Size

31 kB

Total Files

11

Last publish

Collaborators

  • alexlndn