# colors-regex

> Regular expressions for rgb, rgba, hex, hexa, hsl &amp; hsla colors

Latest version **2.0.0** (published 2018-07-04) · MIT license · 0 weekly downloads

## Install

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

## 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.0.0 |
| Published | 2018-07-04 |
| First published | 2016-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Tiaan du Plessis |
| Maintainers | tiaanduplessis |
| Keywords | regexp,, rgb,, rgba,, hex,, hexa,, hsl,, hsla, colors-regex |

## Links

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

## 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.0.0 (latest) — 2018-07-04
- 1.0.0 — 2016-12-16

## README

# colors-regex
[![package version](https://img.shields.io/npm/v/colors-regex.svg?style=flat-square)](https://npmjs.org/package/colors-regex)
[![package downloads](https://img.shields.io/npm/dm/colors-regex.svg?style=flat-square)](https://npmjs.org/package/colors-regex)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![package license](https://img.shields.io/npm/l/colors-regex.svg?style=flat-square)](https://npmjs.org/package/colors-regex)
[![make a pull request](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

> Regular expressions for rgb, rgba, hex, hexa, hsl &amp; hsla colors

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [Contribute](#contribute)
- [License](#License)

## Install

This project uses [node](https://nodejs.org) and [npm](https://www.npmjs.com). 

```sh
$ npm install colors-regex
$ # OR
$ yarn add colors-regex
```

## Usage

```js
const assert = require('assert')
const colorRegex = require('colors-regex')

assert(colorRegex.hex.strict.test('#000000')) // Success
assert(colorRegex.hex.strict.test('#2')) // Failure

```

## Contribute

1. Fork it and create your feature branch: git checkout -b my-new-feature
2. Commit your changes: git commit -am 'Add some feature'
3. Push to the branch: git push origin my-new-feature 
4. Submit a pull request

## License

MIT

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