npm.io
1.4.1 • Published 1 year ago

micro-ansi

Licence
MIT
Version
1.4.1
Deps
0
Size
16 kB
Vulns
0
Weekly
0

micro-ansi

Easily use 4 bit ANSI colors in your HTML or terminal

Why

Well, because I can. And as lovely as Chalk is, it's a bit over-engineered for use with Next.js and gives me more errors than it was worth.

  • Use with TypeScript or JavaScript.
  • NextJS safe.
  • Super simple. It's literally tiny.

Installation

npm import micro-ansi

Usage

ansi.color("Text goes here")

Color Examples

Normal Color Bright Color
black black brightBlack brightBlack
red red brightRed brightRed
green green brightGreen brightGreen
yellow yellow brightYellow brightYellow
blue blue brightBlue brightBlue
magenta magenta brightMagenta brightMagenta
cyan cyan brightCyan brightCyan
white white brightWhite brightWhite

Keywords