# chai-colors

> Color assertions for chai

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

## Install

```sh
npm install chai-colors
pnpm add chai-colors
yarn add chai-colors
bun add chai-colors
```

## 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-19 |
| First published | 2014-10-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Adam Hull |
| Maintainers | hurrymaplelad |
| Keywords | chai, chai-plugin, browser, plugin, color, colors, assertion |

## Links

- npm: https://www.npmjs.com/package/chai-colors
- Repository: https://github.com/hurrymaplelad/chai-colors
- Issues: https://github.com/hurrymaplelad/chai-colors/issues
- npm.io page: https://npm.io/package/chai-colors

## Dependencies (1)

- [onecolor](https://npm.io/package/onecolor.md) ~2.4.2

## 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

- 1.0.1 (latest) — 2015-11-19
- 1.0.0 — 2014-10-21

## README

chai-colors
==============

Color assertions for chai.  Thin wrapper around [onecolor](https://github.com/One-com/one-color).

[![NPM version](http://img.shields.io/npm/v/chai-colors.svg?style=flat-square)](https://www.npmjs.org/package/chai-colors)
[![Build Status](http://img.shields.io/travis/hurrymaplelad/chai-colors/master.svg?style=flat-square)](https://travis-ci.org/hurrymaplelad/chai-colors)

Compare different color representations:

```js
'rgba(0, 0, 0, 1)'.should.be.colored('#000000');
```

Combine with [webdriver](https://github.com/admc/wd) for more fun:

```js
browser
  .elementByCss('code .hljs-keyword')
  .getComputedCss('color').should.eventually.be.colored('mintcream')
```

#### Installation

This is a addon plugin for the [Chai Assertion Library](http://chaijs.com). Install via [npm](http://npmjs.org).

    npm install chai-colors


#### Plugin

Use this plugin as you would all other Chai plugins.

```js
var chai = require('chai')
  , chaiColors = require('chai-colors');

chai.use(chaiColors);
```

#### Supported Formats

See the [onecolor API](https://github.com/One-com/one-color#api-overview).

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