# dye

> Coloring library for console strings

Latest version **1.0.1** (published 2015-11-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install dye
pnpm add dye
yarn add dye
bun add dye
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2015-11-13 |
| First published | 2012-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | Eirik Albrigtsen |
| Maintainers | clux |
| Keywords | color, terminal, ANSI, escape, sequence, console, chalk, minimalistic |

## Links

- npm: https://www.npmjs.com/package/dye
- Repository: https://github.com/clux/dye
- Homepage: https://github.com/clux/dye#readme
- Issues: http://github.com/clux/dye/issues
- npm.io page: https://npm.io/package/dye

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2015-11-13
- 1.0.0 — 2015-04-02
- 0.2.1 — 2014-07-10
- 0.2.0 — 2013-01-12
- 0.1.0 — 2012-10-06
- 0.0.1 — 2012-10-05

## README

# dye
[![npm status](http://img.shields.io/npm/v/dye.svg)](https://www.npmjs.org/package/dye)
[![build status](https://secure.travis-ci.org/clux/dye.svg)](http://travis-ci.org/clux/dye)
[![dependency status](https://david-dm.org/clux/dye.svg)](https://david-dm.org/clux/dye)
[![coverage status](http://img.shields.io/coveralls/clux/dye.svg)](https://coveralls.io/r/clux/dye)

Dye is a coloring/styling library for wrapping common ANSI escape sequences around text that produce colors/styling when logged to a terminal.

The interface mostly mirrors the popular `colors` module on `npm`, but does not introduce implicit global dependencies in your code via `String.prototype`, and has been cleaned up for terminal use only.

## Usage
Basic usage is simply `dye.red(str)`. All the exported colors with `bold` (aka bright) variants should work everywhere. Here we test all the methods in both variants.

```js
var dye = require('dye');
var cols = ['white', 'black', 'grey', 'blue', 'cyan', 'green', 'magenta', 'red','yellow'];
cols.forEach(function (col) {
  var colored = dye[col](col);
  console.log(colored);
  console.log(dye.bold(colored));
});
```

![example output!](https://github.com/clux/dye/raw/master/imgs/output.png)

## Experimental
The `inverse`, `underline`, `italic` functions have sparse support (no worky on windows).

### Installation

```sh
$ npm install dye
```

## License
MIT-Licensed. See LICENSE file for details.

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