monochrome-color-scale
v0.0.1
Published
Generate a monochromatic color scale for a color
Downloads
5
Maintainers
Readme
monochrome-color-scale
Feed an rgb array and the number of scale units to create a monochromatic color scale
Install
$ npm install monochrome-color-scale
Usage
monochrome(color, units, [options])
Params
color
: Array <(RGB)> - Array length of three integers from 0 to 255 to create the red, green, blue colorunits
: Integer - The number of scale divisionsoptions
: Object <(Optional)> - Output and scale optionsmin
: Integer <Default: 5> - the luminosity value 0 to 100max
: Integer <Default: 95> - the luminosity value 0 to 100rgb
: Boolean <Default: false> - Add RGB color to output scale
var monochrome = require('monochrome-color-scale');
var rgbColor = [61, 181, 182];
var units = 3;
var scale = monochrome(color, units);
// console.log(scale) result
//
// {
// "colors": [
// {
// "index": 0,
// "hsl": [180, 50, 5]
// },
// {
// "index": 1,
// "hsl": [180, 50, 50]
// },
// {
// "index": 2,
// "hsl": [180, 50, 95]
// }
// ]
// }
Contact
Andy B