$ gnpm install tiny-colors
A tiny library providing the basic ANSI colors for the terminal.
npm install --save tiny-colors
The following color functions are provided.
Foreground | Background | Modifiers |
---|---|---|
black |
bgBlack |
reset |
red |
bgRed |
bold |
green |
bgGreen |
dim |
yellow |
bgYellow |
italic |
blue |
bgBlue |
underline |
magenta |
bgMagenta |
overline |
cyan |
bgCyan |
inverse |
white |
bgWhite |
hidden |
gray |
bgGray |
strikethrough |
import colors from 'tiny-colors';
// Unchained usage
console.log ( colors.bgMagenta ( colors.italic ( 'foo' ) ) );
// Chained usage
console.log ( colors.bgMagenta.italic ( 'foo' ) );
MIT © Fabio Spampinato
Copyright 2013 - present © cnpmjs.org | Home |