# rgb-regex

> Regex for RGB color strings.

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

## Install

```sh
npm install rgb-regex
pnpm add rgb-regex
yarn add rgb-regex
bun add rgb-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 | 1.0.1 |
| Published | 2015-02-02 |
| First published | 2015-02-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | John Otander |
| Maintainers | johno |
| Keywords | css, regex, regexp, regexps, rgb, color, regular, expression |

## Links

- npm: https://www.npmjs.com/package/rgb-regex
- Repository: https://github.com/regexps/rgb-regex
- Issues: https://github.com/regexps/rgb-regex/issues
- npm.io page: https://npm.io/package/rgb-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

- 1.0.1 (latest) — 2015-02-02
- 1.0.0 — 2015-02-01

## README

# rgb-regex

[![Build Status](https://secure.travis-ci.org/regexps/rgb-regex.png?branch=master)](https://travis-ci.org/regexps/rgb-regex)

Regex for RGB color strings.

## Installation

```bash
npm install --save rgb-regex
```

## Usage

```javascript
var rgbRegex = require('rgb-regex');

rgbRegex({ exact: true }).test('rgb(12, 34, 56)');  // => true
rgbRegex({ exact: true }).test('unicorns');         // -> false
rgbRegex({ exact: true }).test('rgb(,,)');          // => false

rgbRegex().exec('rgb(12, 34, 56)');
// => [
//  '12',
//  '34',
//  '56',
//  index: 0,
//  input: 'rgb(12,34,56)'
// ]

'rgb(12, 34, 56) cats and dogs'.match(rgbRegex());
// = ['rgb(12, 34, 56)']
```

## License

MIT

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Crafted with <3 by John Otander ([@4lpine](https://twitter.com/4lpine)).

***

> This package was initially generated with [yeoman](http://yeoman.io) and the [p generator](https://github.com/johnotander/generator-p.git).

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