# color-fade

> fade two colors on specific time period

Latest version **1.0.7** (published 2020-08-26) · MIT license · 0 weekly downloads

## Install

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

## 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.7 |
| Published | 2020-08-26 |
| First published | 2020-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 4.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | isuru_sampath |
| Maintainers | isuru_asp |
| Keywords | color, fade, range, fade-color |

## Links

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

## 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.7 (latest) — 2020-08-26
- 1.0.6 — 2020-08-25
- 1.0.5 — 2020-08-25
- 1.0.3 — 2020-08-24
- 1.0.2 — 2020-08-24
- 1.0.1 — 2020-08-24
- 1.0.0 — 2020-08-24

## README

##### features
- fade between two colors
- scatter fade steps as your wanted.
- get color of the specific point

##### How is it works


    const fadeColor = require('color-fade')
    const startingColor = "#66cdaa"
    const endingColor = "#ffffff"
    const numberOfSteps = 5
    
    const color = await fadeColor(startingColor, endingColor, numberOfSteps)
    // [ '#66cdaa', '#8cdabf', '#b3e6d5', '#d9f3ea', '#ffffff' ]
    

you can get specific point color code


    const fadeColor = require('color-fade')
    const startingColor = "#66cdaa"
    const endingColor = "#ffffff"
    const numberOfSteps = 5
    const selectColorAt = 3
    
    const color = await fadeColor(startingColor, endingColor, numberOfSteps, selectColorAt)
    //'#b3e6d5'

specify output type
- default it will return as hex


    const fadeColor = require('color-fade')
    const startingColor = "#66cdaa"
    const endingColor = "#ffffff"
    const numberOfSteps = 5
    const selectColorAt = 3
    const format = 'hex' // 'rgb' 
    
    const color = await fadeColor(startingColor, endingColor, numberOfSteps, selectColorAt, format)
    //'#b3e6d5'

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