# ansi-colorizer

> Colorize/brighten text for terminals with ANSI escape sequences

Latest version **1.0.1** (published 2015-11-12) · BSD-3-Clause license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ansi-colorizer
pnpm add ansi-colorizer
yarn add ansi-colorizer
bun add ansi-colorizer
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-11-12 |
| First published | 2012-11-26 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Christian Johansen |
| Maintainers | augustl, cjohansen, dominykas, dwittner |

## Links

- npm: https://www.npmjs.com/package/ansi-colorizer
- Repository: https://github.com/busterjs/ansi-colorizer
- Homepage: http://busterjs.org/docs/ansi-colorizer
- Issues: https://github.com/busterjs/ansi-colorizer/issues
- npm.io page: https://npm.io/package/ansi-colorizer

## Recent versions

- 1.0.1 (latest) — 2015-11-12
- 1.0.0 — 2013-09-16
- 0.5.0 — 2012-11-26

## README

# ansi-colorizer

[![Build status](https://secure.travis-ci.org/busterjs/ansi-colorizer.png?branch=master)](http://travis-ci.org/busterjs/ansi-colorizer)

> Dim and bright pretty shell colors

`ansi-colorizer` is a small utility to add ANSI escape sequences to strings to
output them with color. Configuring the colorizer produces an object that may
or may not colorize or brighten text.

### `configure(options)`

Returns a new colorizer instance. Configuration options are `color` and
`bright`. Both are booleans, and both are `false` by default. If both
settings are `false` (the default), the colorizer will not really do anything.
When `color` is `true`, methods colorize strings. When `bright` is
`true`, all color methods will result in the bright color variant.

```javascript
var ansiColorizer = require("ansi-colorizer");

var colorizer = ansiColorizer.configure({ color: true, bright: false });
colorizer.red("Hey"); //=> "\x1b[31mHey\x1b[0m"

colorizer = ansiColorizer.configure({ color: true, bright: trie });
colorizer.red("Hey"); //=> "\x1b[1m\x1b[31mHey\x1b[0m"

colorizer = ansiColorizer.configure();
colorizer.red("Hey"); //=> "Hey"
```    

### `bold(string)`

Brightens the string.


### `red(string)`

Colors string red.


### `yellow(string)`

Colors string yellow.


### `green(string)`

Colors string green.


### `purple(string)`

Colors string purple.


### `cyan(string)`

Colors string cyan.


### `grey(string)`

Colors string grey.

---
_Source: https://npm.io/package/ansi-colorizer · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
