# colorful

> colorful if a terminal tool for colors

Latest version **2.1.0** (published 2013-05-22) · 0 weekly downloads

## Install

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

## 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 | 2.1.0 |
| Published | 2013-05-22 |
| First published | 2012-12-07 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 61 |
| Author | Hsiaoming Yang |
| Maintainers | lepture |
| Keywords | color, ansi, 256color, console, terminal |

## Links

- npm: https://www.npmjs.com/package/colorful
- Repository: https://github.com/lepture/colorful
- npm.io page: https://npm.io/package/colorful

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 2.1.0 (latest) — 2013-05-22
- 2.0.3 — 2013-03-23
- 2.0.2 — 2013-03-22
- 2.0.1 — 2013-03-18
- 2.0.0 — 2013-03-18
- 1.3.0 — 2013-03-17
- 1.2.3 — 2013-01-25
- 1.2.2 — 2013-01-22
- 1.2.0 — 2013-01-06
- 1.1.2 — 2012-12-29
- 1.1.1 — 2012-12-27
- 1.1.0 — 2012-12-21
- 1.0.2 — 2012-12-10
- 1.0.1 — 2012-12-08
- 1.0.0 — 2012-12-07

## README

# Colorful

It's not just color, it's everything colorful in terminal.

---------------------

# Color

Color in terminal and only terminal.

![screen shot](./screen-shot.png)

## Programmer

As a programmer, you think they are functions:

```javascript
var color = require('colorful')
color.red('hello')
color.underline('hello')
color.red(color.underline('hello'))
```

## Human

As a human, you think you are a painter:

```javascript
var paint = require('colorful').paint
paint('hello').red.color
paint('hello').bold.underline.red.color
```

**WTF**, is bold, underline a color? If you don't like the idea, try:

```javascript
paint('hello').bold.underline.red.style
```

## Alien

As an alien, you are from outer space, you think it should be:

```javascript
require('colorful').colorful()
'hello'.to.red.color
'hello'.to.underline.bold.red.color
'hello'.to.underline.bold.red.style
```


## Artist

As an artist, you need more colors.

```javascript
var Color = require('colorful').Color;

var s = new Color('colorful');
s.fgcolor = 13;
s.bgcolor = 61;
```

Support ANSI 256 colors. [0 - 255]


## Toxic

Let's posion the string object, just like colors does.

```javascript
require('colorful').toxic()
'hello'.bold
'hello'.red
```


## Detective

As a detective, you think we should detect if color is supported:

```javascript
require('colorful').isSupported

// we can disable color
require('colorful').disabled = true
require('colorful').isSupported
// => false
```

# Colors

- bold
- faint
- italic
- underline
- blink
- overline
- inverse
- conceal
- strike
- black
- black_bg
- red
- red_bg
- green
- green_bg
- yellow
- yellow_bg
- blue
- blue_bg
- magenta
- magenta_bg
- cyan
- cyan_bg
- white
- white_bg
- grey
- gray

# Changelog

**2013-05-22** `2.1.0`

Add toxic API.

**2013-03-22** `2.0.2`

Merge terminal into ansi.

**2013-03-18** `2.0.1`

Add gray color.

**2013-03-18** `2.0.0`

Redesign. Support for ANSI 256 colors.

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