Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/bencevans/fade-steps

Generate an array of steps between two colours
https://github.com/bencevans/fade-steps

Last synced: 23 days ago
JSON representation

Generate an array of steps between two colours

Awesome Lists containing this project

README

        

# fade-steps

> Generate an array of steps for fading between colours

## Install

$ npm install --save fade-steps

## Usage

```js
const fadeSteps = require('fade-steps')

const startColour = '000000'
const endColour = 'ff00ff'
const stepCount = 5

const colours = fadeSteps(startColour, endColour, stepCount)

console.log(colours)
/*
[ '000000', '400040', '800080', 'bf00bf', 'ff00ff' ]
*/
```

## Licence

MIT © [Ben Evans](http://bensbit.co.uk)