An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

        

# hsl-rgb [![Build Status](https://travis-ci.org/varld/hsl-rgb.svg?branch=master)](https://travis-ci.org/varld/hsl-rgb) [![codecov](https://codecov.io/gh/varld/hsl-rgb/branch/master/graph/badge.svg)](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)