# postcss-color-hsl

> PostCSS plugin to transform W3C CSS Color Module Level 4 hsl() new syntax to more compatible CSS (comma-separated hsl() or hsla())

Latest version **2.0.0** (published 2017-05-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-color-hsl
pnpm add postcss-color-hsl
yarn add postcss-color-hsl
bun add postcss-color-hsl
```

## 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 | 2017-05-25 |
| First published | 2016-11-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Author | David Marchena |
| Maintainers | dmarchena |
| Keywords | postcss, css, postcss-plugin, color, hsl, hsla |

## Links

- npm: https://www.npmjs.com/package/postcss-color-hsl
- Repository: https://github.com/dmarchena/postcss-color-hsl
- Issues: https://github.com/dmarchena/postcss-color-hsl/issues
- npm.io page: https://npm.io/package/postcss-color-hsl

## Dependencies (3)

- [postcss](https://npm.io/package/postcss.md) ^6.0.1
- [units-css](https://npm.io/package/units-css.md) ^0.4.0
- [postcss-value-parser](https://npm.io/package/postcss-value-parser.md) ^3.3.0

## 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) — 2017-05-25
- 1.0.5 — 2016-11-16
- 1.0.4 — 2016-11-16
- 1.0.3 — 2016-11-14
- 1.0.2 — 2016-11-14
- 1.0.1 — 2016-11-13
- 1.0.0 — 2016-11-13

## README

# PostCSS Color Hsl [![Build Status][ci-img]][ci] [![Coverage Status][cov-img]][cov]

[PostCSS] plugin to transform [W3C CSS Color Module Level 4 hsl()](https://drafts.csswg.org/css-color/#the-hsl-notation) new syntax to more compatible CSS (comma-separated hsl() or hsla()).

[PostCSS]: https://github.com/postcss/postcss
[ci-img]:  https://travis-ci.org/dmarchena/postcss-color-hsl.svg
[ci]:      https://travis-ci.org/dmarchena/postcss-color-hsl
[cov-img]: https://coveralls.io/repos/github/dmarchena/postcss-color-hsl/badge.svg
[cov]:     https://coveralls.io/github/dmarchena/postcss-color-hsl

## CSS Colors 4 syntax

```
hsl() = hsl( <hue> <percentage> <percentage> [ / <alpha-value> ]? )
<hue> = <number> | <angle>
<alpha-value> = <number> | <percentage>
```

## CSS Colors 3 syntax (actual)

```
hsl()  = hsl( <hue>, <percentage>, <percentage> )
hsla() = hsla( <hue>, <percentage>, <percentage>, <alpha-value> )
<hue> = <number>
<alpha-value> = <number>
```

## Example

```css
.foo {
  /* Input example */
  color: hsl(0 100% 50%);
  border-color: hsl(200grad 100% 50% / 20%);
}
```

```css
.foo {
  /* Output example */
  color: hsl(0, 100%, 50%);
  border-color: hsla(180, 100%, 50%, .2);
}
```

## Usage

```js
postcss([ require('postcss-color-hsl') ])
```

See [PostCSS] docs for examples for your environment.

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