0.0.4 • Published 5 years ago

color-gradient v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Color Gradient

A package for generate colors between two colors

Installation

npm install color-gradient --save

Usage

var generate = require("color-gradient");

// generate(start_color, end_color, midpoint, options)
var colors = generate("#fff", "#000", 6, { has_heads: true, output: "rgb" });

Return

["rgb(255,255,255)", "rgb(219,219,219)", ..."rgb(0,0,0)"];

Options

OptionTypeDefalutDescription
outputString'rgb''rgb' or 'hex' change output type
has_headsBooleantrueInclude input data with start and end

Test

npm test

Todos

  • RGB input support