Creates darker or lighter shades of a hex color. Originally inspired from a question on StackOverflow.
Install with npm.
npm install shader
import shader from 'shader';
const color = '#fff';
const myNewShade = shader(color, -1.0);
param | type | description |
---|---|---|
color | string | the hex code for the color |
value | int | a range from -1.0 (darkest) to 1.0 (lightest) |
Copyright 2015-2017 Patrick Burtchaell. Licensed MIT.