# hsl-regex

> Regex for matching HSL colors.

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

## Install

```sh
npm install hsl-regex
pnpm add hsl-regex
yarn add hsl-regex
bun add hsl-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 | 11 |
| Author | John Otander |
| Maintainers | johno |
| Keywords | hsl, regex, regexp, color, css |

## Links

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

# hsl-regex

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

Regex for matching HSL colors.

## Installation

```bash
npm install --save hsl-regex
```

## Usage

```javascript
var hslRegex = require('hsl-regex');

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

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

'hsl(123, 45%, 67%) cats and dogs'.match(hslRegex());
// = ['hsl(123, 45%, 67%)']
```

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