Skip to content

ibrahimtelman/color-gradient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm npm bundle size npm GitHub

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("#ffffff", "#000000", 6, { has_heads: true, output: "rgb" });

Return

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

Options

Option Type Defalut Description
output String 'rgb' 'rgb' or 'hex' change output type
has_heads Boolean true Include input data with start and end

Test

npm test

Todos

  • RGB input support

About

A package for generate colors between two colors

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published