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

https://github.com/herber-legacy-4-varld-1/hsl-triad

🍭 Generate a color triad.
https://github.com/herber-legacy-4-varld-1/hsl-triad

color hsl triad

Last synced: 3 months ago
JSON representation

🍭 Generate a color triad.

Awesome Lists containing this project

README

          

# hsl-triad [![Build Status](https://travis-ci.org/varld/hsl-triad.svg?branch=master)](https://travis-ci.org/varld/hsl-triad) [![codecov](https://codecov.io/gh/varld/hsl-triad/branch/master/graph/badge.svg)](https://codecov.io/gh/varld/hsl-triad)

> Generate a color triad.

## Install

```
$ npm install hsl-triad
```

## Usage

```js
const hslTriad = require('hsl-triad');

hslRgb(340, 1, 0.5);
//=> [
//=> [340, 1, 0.5],
//=> [100, 1, 0.5],
//=> [220, 1, 0.5]
//=> ]
```

## 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 arrays containing `hsl` values.

## License

MIT © [Tobias Herber](http://herber.space)