# color-steps

> A utility for calculating intermediate steps between two colors.

Latest version **1.0.2** (published 2018-10-28) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install color-steps
pnpm add color-steps
yarn add color-steps
bun add color-steps
```

Provides the command `color-steps`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-10-28 |
| First published | 2017-12-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=6.12.2 |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | mjswensen |
| Maintainers | mjswensen |
| Keywords | color, gradient, intermediate |

## Links

- npm: https://www.npmjs.com/package/color-steps
- Repository: https://github.com/mjswensen/color-steps
- Homepage: https://github.com/mjswensen/color-steps#readme
- Issues: https://github.com/mjswensen/color-steps/issues
- npm.io page: https://npm.io/package/color-steps

## Dependencies (1)

- [onecolor](https://npm.io/package/onecolor.md) ^3.0.5

## 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

- 1.0.2 (latest) — 2018-10-28
- 1.0.1 — 2018-01-01
- 1.0.0 — 2017-12-29

## README

![stepping colors](https://cdn.jsdelivr.net/gh/mjswensen/color-steps@53b83ef842b5134399f37f396e686755916f879c/assets/gradient-1.svg)

# color-steps [![Travis](https://img.shields.io/travis/mjswensen/color-steps.svg)](https://travis-ci.org/mjswensen/color-steps)

A utility for calculating intermediate steps between two colors.

## API

This package exports a single function that takes three arguments:

* `color1` - a CSS color string
* `color2` - a CSS color string
* `count` - the desired number of intermediate colors to return, defaults to `6`

The return value is an array of colors in `rgba` format (or `rgb` if all colors have an alpha value of `1`).

## CLI

This package also exposes a single executable (called `color-steps`) that accepts command-line arguments which are the same as the function arguments detailed above.

```
color-steps "red" "blue" 10
```

## Try it

```
$ npx color-steps "black" "white" 5

rgb(43,43,43)
rgb(85,85,85)
rgb(128,128,128)
rgb(170,170,170)
rgb(212,212,212)
```

![stepping colors](https://cdn.jsdelivr.net/gh/mjswensen/color-steps@53b83ef842b5134399f37f396e686755916f879c/assets/gradient-2.svg)

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