Sha256: ce2224b7ae4876720e12098f31a5f87ec098578ee33f4c64ece5005c417cada9

Contents?: true

Size: 1.08 KB

Versions: 30

Compression:

Stored size: 1.08 KB

Contents

# ansi-styles [![Build Status](https://travis-ci.org/sindresorhus/ansi-styles.svg?branch=master)](https://travis-ci.org/sindresorhus/ansi-styles)

> [ANSI escape codes](http://en.wikipedia.org/wiki/ANSI_escape_code#Colors_and_Styles) for styling strings in the terminal

You probably want the higher-level [chalk](https://github.com/sindresorhus/chalk) module for styling your strings.

![screenshot](screenshot.png)


## Install

```sh
$ npm install --save ansi-styles
```


## Usage

```js
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

- `reset`
- `bold`
- `dim`
- `italic` *(not widely supported)*
- `underline`
- `inverse`
- `hidden`
- `strikethrough` *(not widely supported)*

### Text colors

- `black`
- `red`
- `green`
- `yellow`
- `blue`
- `magenta`
- `cyan`
- `white`
- `gray`

### Background colors

- `bgBlack`
- `bgRed`
- `bgGreen`
- `bgYellow`
- `bgBlue`
- `bgMagenta`
- `bgCyan`
- `bgWhite`


## License

MIT © [Sindre Sorhus](http://sindresorhus.com)

Version data entries

30 entries across 14 versions & 4 rubygems

Version Path
gulp_assets-1.0.0.pre.5 template/node_modules/gulp-rev-replace/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md
gulp_assets-1.0.0.pre.5 template/node_modules/gulp-livereload/node_modules/chalk/node_modules/ansi-styles/readme.md
gulp_assets-1.0.0.pre.4 template/node_modules/gulp-rev-replace/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md
gulp_assets-1.0.0.pre.4 template/node_modules/gulp-livereload/node_modules/chalk/node_modules/ansi-styles/readme.md
gulp_assets-1.0.0.pre.3 template/node_modules/gulp-livereload/node_modules/chalk/node_modules/ansi-styles/readme.md
gulp_assets-1.0.0.pre.3 template/node_modules/gulp-rev-replace/node_modules/gulp-util/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.16 spec/dummy/public/node_modules/bower/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.15 spec/dummy/public/node_modules/bower/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.14 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.14 spec/dummy/public/node_modules/bower/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.13 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.13 spec/dummy/public/node_modules/bower/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.12 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.12 spec/dummy/public/node_modules/bower/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.11 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.11 spec/dummy/public/node_modules/bower/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.10 spec/dummy/public/node_modules/bower/node_modules/insight/node_modules/chalk/node_modules/ansi-styles/readme.md
entangled-0.0.10 spec/dummy/public/node_modules/bower/node_modules/chalk/node_modules/ansi-styles/readme.md