Skip to content

shianqi/color-mapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

color-mapper

install

With npm:

npm install color-mapper

Usage

var createLinearGradient = require('../index')

var gradient = createLinearGradient(0, 255);

gradient.addColorStop(1.0, '#1ec38e');
gradient.addColorStop(0.2, '#fed741');
gradient.addColorStop(0.15, '#fea429');
gradient.addColorStop(0.1, '#ef6b2f');
gradient.addColorStop(0.05, '#dc3b2a');
gradient.addColorStop(0.0, '#901334');

console.log(gradient.getHex(24));
console.log(gradient.getHex(255));
console.log(gradient.getHex(0));
console.log(gradient.getHex(26));

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published