hsl-rgb
Version:
Convert hsl colors to rgb colors
54 lines (31 loc) • 714 B
Markdown
# hsl-rgb [](https://travis-ci.org/usemeta/hsl-rgb) [](https://codecov.io/gh/usemeta/hsl-rgb)
> Convert hsl colors to rgb colors
## Install
```
$ npm install hsl-rgb
```
## Usage
```js
const hslRgb = require('hsl-rgb');
hsl2rgb(340, 1, 0.5);
//=> [255, 0, 85]
```
## API
### hslRgb(h, s, l)
#### h
Type: `number`
Max: `360`
The hue
#### s
Type: `number`
Max: `1`
The saturation
#### l
Type: `number`
Max: `1`
The lightness
#### Retuns
Type: `array`
An array of `r`, `g` and `b` values.
## License
MIT © [Tobias Herber](http://tobihrbr.com)