https://github.com/varld/hsl-rgb
🎨 Convert hsl colors to rgb colors.
https://github.com/varld/hsl-rgb
color convert hsl rgb
Last synced: 6 months ago
JSON representation
🎨 Convert hsl colors to rgb colors.
- Host: GitHub
- URL: https://github.com/varld/hsl-rgb
- Owner: varld
- License: mit
- Created: 2018-10-01T13:04:37.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-01T08:27:18.000Z (over 5 years ago)
- Last Synced: 2024-08-08T23:13:43.008Z (10 months ago)
- Topics: color, convert, hsl, rgb
- Language: JavaScript
- Homepage:
- Size: 10.7 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license
Awesome Lists containing this project
README
# hsl-rgb [](https://travis-ci.org/varld/hsl-rgb) [](https://codecov.io/gh/varld/hsl-rgb)
Convert hsl colors to rgb colors.
## Install
```
$ npm install hsl-rgb
```## Usage
```js
const hslRgb = require('hsl-rgb');hslRgb(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](https://herber.space)
![]()