# rainbow-gradient

> Generates a gradient of the colors of the rainbow.

Latest version **1.0.0** (published 2018-08-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install rainbow-gradient
pnpm add rainbow-gradient
yarn add rainbow-gradient
bun add rainbow-gradient
```

## 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 | 1.0.0 |
| Published | 2018-08-11 |
| First published | 2018-08-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 140.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Charles Stover |
| Maintainers | charlesstover |
| Keywords | rainbow |

## Links

- npm: https://www.npmjs.com/package/rainbow-gradient
- Repository: https://github.com/CharlesStover/rainbow-gradient
- Homepage: https://github.com/CharlesStover/rainbow-gradient#readme
- Issues: https://github.com/CharlesStover/rainbow-gradient/issues
- npm.io page: https://npm.io/package/rainbow-gradient

## Dependencies (1)

- [@charlesstover/hsl2rgb](https://npm.io/package/@charlesstover/hsl2rgb.md) ^1.0.4

## Recent versions

- 1.0.0 (latest) — 2018-08-11

## README

# rainbow-gradient
Generates a gradient of the colors of the rainbow.

[![package](https://img.shields.io/github/package-json/v/CharlesStover/rainbow-gradient.svg)](http://github.com/CharlesStover/delimiter/)
[![build](https://travis-ci.com/CharlesStover/rainbow-gradient.svg)](https://travis-ci.com/CharlesStover/delimiter/)
[![downloads](https://img.shields.io/npm/dt/rainbow-gradient.svg)](https://www.npmjs.com/package/delimiter)
[![minified size](https://img.shields.io/bundlephobia/min/rainbow-gradient.svg)](https://www.npmjs.com/package/delimiter)
[![minzipped size](https://img.shields.io/bundlephobia/minzip/rainbow-gradient.svg)](https://www.npmjs.com/package/delimiter)

## Install
* `npm install rainbow-gradient --save` or
* `yarn add rainbow-gradient`

## Use
```JS
import rainbowGradient from 'rainbow-gradient';

// Creates an array with three colors:
rainbowGradient(3);

// Creates an array with 10 colors, darkened and washed out:
rainbowGradient(10, 0.5, 0.25);
```

## Parameters

* length

  The number of colors in the resulting gradient array.

* saturation

  The saturation of the colors. `0` represents grayscale. `1` represents full color. Default: `1`.

* lightness

  The lightness of the colors. `0` represents black. `1` represents white. Default: `0.5`.

## Return Value

The function returns an array of colors based on the parameters. Each color is an array of red, green, and blue values from 0 to 255.

Example:

`rainbowGradient(3)` returns:

```JS
[
  [ 255, 0, 0 ],
  [ 0, 255, 0 ],
  [ 0, 0, 255 ]
]
```

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