ansi-styles

ANSI escape codes for colorizing strings in the terminal.

You probably want the higher-level chalk module for styling your strings.

Install

Install with npm: npm install --save ansi-styles

Example

var ansi = require('ansi-styles');

console.log(ansi.green.open + 'Hello world!' + ansi.green.close);

API

Each style has an open and close property.

Styles

General

Text colors

Background colors

License

MIT © Sindre Sorhus