ansi-colorcodes
v1.0.1
Published
To simply add a collection of ANSI color-codes use this simple package. It does not contain any special logic, only an object with the colors. Because of that, it comes with zero dependencies and is *very* small.
Downloads
2
Readme
ANSI-Colorcodes collection
To simply add a collection of ANSI color-codes use this simple package. It does not contain any special logic, only an object with the colors. Because of that, it comes with zero dependencies and is very small.
Usage
const colors = require("ansi-colorcodes");
console.log(`${colors.bg.black + colors.mods.bold}This text is ${colors.fg.green}green${colors.reset}!`);
Structure
colors.fg
- contains foreground colorscolors.bg
- contains background colorscolors.mods
- contains formatting things like underline etc.