# rgba-regex

> Regex for matching RGBA color strings.

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

## Install

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

## Links

- npm: https://www.npmjs.com/package/rgba-regex
- Repository: https://github.com/johnotander/rgba-regex
- Issues: https://github.com/johnotander/rgba-regex/issues
- npm.io page: https://npm.io/package/rgba-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.0 (latest) — 2015-02-02

## README

# rgba-regex

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

Regex for matching RGBA color strings.

## Installation

```bash
npm install --save rgba-regex
```

## Usage

```javascript
var rgbaRegex = require('rgba-regex');

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

rgbaRegex().exec('rgba(12, 34, 56, .8)');
// => [
//  '12',
//  '34',
//  '56',
//  '.8'
//  index: 0,
//  input: 'rgba(12,34,56, .8)'
// ]

'rgba(12, 34, 56, .8) cats and dogs'.match(rgbaRegex());
// = ['rgba(12, 34, 56, .8)']
```

## 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/rgba-regex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
