colorstops
Mix colors against multiple color stops.
Installation
ES6 Module
;
Browserify
$ browserify colorstops.js --standalone ColorStops -o colorstops-browser.js
Usage
Constructor
let colorStops = color: '#FF0000' value: 20 color: '#00FF00' value: 40 color: '#0000FF' value: 80 ;
hex
Get a mixed hex color string for an input value against the defined color stops.
colorStops; // '#FF0000'colorStops; // '#FF0000'colorStops; // '#808000'colorStops; // '#00FF00'colorStops; // '#00F906'colorStops; // '#0006F9'colorStops; // '#0000FF'
Tests
$ npm run test
License
This software is released under the terms of the MIT license. See LICENSE
.