Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

esc-colors

446 bytes no-nonsense reliable colors for CLI/terminal console.log on Linux/Mac.

no dependencies, simple, cli, terminal, linux, unix, mac, escape colors, terminal colors, ANSI colors, lightweight, color formatting, Node.js, console log, console logging, console output, cross-platform, easy to use, small footprint, auditing, reliable, MIT license

readme

esc-colors

Lightweight (446 bytes) alternative to colors.

Project goals

  • No dependencies
  • Small, simple, easy to audit, yourself
  • Works on Linux or Mac (ANSI terminals)
  • No nonsense
  • Dependable, there won't be any radical updates in future.

If I want to add features I'll make a new package and will rather mention it in this readme than change this package.

Installation

  1. npm install esc-colors

Example

import colors from 'esc-colors';

console.log(colors.green('Hello world'));

Object.entries(colors).forEach( ([ colorName, colorF ]) => console.log(colorF(colorName)) );

image

Notes

Have fun!

Say thanks

Star the repo https://github.com/softwarecreations/esc-colors

PR's or issues

Welcome

License

MIT