# gradstop

> JavaScript micro library to generate monotone color schemes and equidistant gradient stops

Latest version **2.2.3** (published 2019-04-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install gradstop
pnpm add gradstop
yarn add gradstop
bun add gradstop
```

## 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 | 2.2.3 |
| Published | 2019-04-07 |
| First published | 2018-08-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 155 |
| Author | Siddharth |
| Maintainers | siddharth11 |
| Keywords | gradstop, gradient, stops, color, colors, hex, rgb, hsl |

## Links

- npm: https://www.npmjs.com/package/gradstop
- Repository: https://github.com/Siddharth11/gradstop
- Homepage: https://github.com/Siddharth11/gradstop#readme
- Issues: https://github.com/Siddharth11/gradstop/issues
- npm.io page: https://npm.io/package/gradstop

## Alternatives

- [postcss-color-hex-alpha](https://npm.io/package/postcss-color-hex-alpha.md) — 6.4M weekly downloads
- [randomcolor](https://npm.io/package/randomcolor.md) — 348.0K weekly downloads
- [bows](https://npm.io/package/bows.md) — 1.3K weekly downloads
- [ep_prefer_color_scheme](https://npm.io/package/ep_prefer_color_scheme.md) — 260 weekly downloads
- [coc-yank](https://npm.io/package/coc-yank.md) — 61 weekly downloads

## Recent versions

- 2.2.3 (latest) — 2019-04-07
- 2.2.2 — 2019-01-06
- 2.2.1 — 2019-01-05
- 2.2.0 — 2018-12-30
- 2.1.6 — 2018-12-29
- 2.1.4 — 2018-09-01
- 2.1.3 — 2018-09-01
- 2.1.2 — 2018-08-31
- 2.1.1 — 2018-08-31
- 2.1.0 — 2018-08-31
- 2.0.0 — 2018-08-31
- 1.0.0 — 2018-08-31

## README

# gradstop

<p>
  <a href="https://www.npmjs.com/package/gradstop">
    <img src="https://badge.fury.io/js/gradstop.svg" alt="NPM Version">
  </a>
  <a href="https://npmcharts.com/compare/gradstop">
    <img src="https://img.shields.io/npm/dm/gradstop.svg" alt="NPM Downloads">
  </a>
  <a href="https://opensource.org/licenses/MIT">
    <img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT">
  </a>
  <a href="https://travis-ci.com/Siddharth11/gradstop">
    <img src="https://travis-ci.com/Siddharth11/gradstop.svg?branch=master" alt="Build Status">
  </a>
</p>

#### JavaScript micro library to generate gradient color stops

| [Demo](http://codepen.io/Siddharth11/full/RPvJmO)  | [UMD Bundle](https://cdn.jsdelivr.net/gh/Siddharth11/gradstop/gradstopUMD.js) |
|---|---|

### Usage:

```
npm install gradstop
```

``` javascript
import gradstop from 'gradstop';

const gradient = gradstop({
    stops: 5,
    inputFormat: 'hex',
    colorArray: ['#343838', '#00DFFC']
});

console.log(gradient);
// rgb(52,56,56), rgb(39,97,105), rgb(26,139,154), rgb(13,181,203), rgb(0,223,252)
```

<img src="gradient strip.png" alt="Gradient Strip" />

<br />

#### Default Parameters:
 * inputFormat: 'hex' (supports hex, rgb and hsl)
 * stops: 5
 * colorArray: ['#fff', '#000'] \(supports upto 4 values)

Both shorthand(#fff) and standard(#ffffff) format hex values are supported.

#### Polyfills required:
- Math.trunc

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