color-code-ansi

1.1.0 • Public • Published

color-code-ansi

Add color and style to your messages in the Node.js console

Usage

import { colorCode } from 'color-code-ansi'

Colors

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • brightblack
  • brightred
  • brightgreen
  • brightyellow
  • brightblue
  • brightmagenta
  • brightcyan
  • brightwhite
console.log(colorCode('Hello, World').color('red').end())
console.log(colorCode('Hello, World').color('#FF8800').end())

Backgrounds

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • brightblack
  • brightred
  • brightgreen
  • brightyellow
  • brightblue
  • brightmagenta
  • brightcyan
  • brightwhite
console.log(colorCode('Hello, World').bg('cyan').end())
console.log(colorCode('Hello, World').bg('#00FF77').end())

Graphics

  • bold
  • dim
  • italic
  • underline
  • blinking
  • inverse
  • hidden
  • strikethrough
console.log(colorCode('Hello, World').grp('bold').end())
console.log(colorCode('Hello, World').grp('italic').end())

Readme

Keywords

none

Package Sidebar

Install

npm i color-code-ansi

Weekly Downloads

0

Version

1.1.0

License

ISC

Unpacked Size

3.88 kB

Total Files

4

Last publish

Collaborators

  • cesar-ch