# hsla-regex

> Regex for matching HSLA colors.

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

## Install

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

## Links

- npm: https://www.npmjs.com/package/hsla-regex
- Repository: https://github.com/regexps/hsla-regex
- Issues: https://github.com/regexps/hsla-regex/issues
- npm.io page: https://npm.io/package/hsla-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-01-30
- 0.0.1 — 2015-01-30

## README

# hsla-regex

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

Regex for matching HSLA colors.

## Installation

```bash
npm install --save hsla-regex
```

## Usage

```javascript
var hslaRegex = require('hsla-regex');

hslaRegex({ exact: true }).test('hsla(123, 45%, 67%, .8)');  // => true
hslaRegex({ exact: true }).test('foo bar');  // => false

hslaRegex({ exact: true }).exec('hsla(1, 1.111%, 1.1111%, .8)');
// => [
//  'hsla(1, 1.111%, 1.1111%, .8)',
//  '1',
//  '1.111%',
//  '1.1111%',
//  '.8'
//  index: 0,
//  input: 'hsla(1, 1.111%, 1.1111%, .8)'
// ]

'hsla(123, 45%, 67%, .8) cats and dogs'.match(hslaRegex());
// = ['hsla(123, 45%, 67%, .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/hsla-regex · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
