shader

Create a darker or lighter shade of a color.

shader

Creates darker or lighter shades of a hex color. Inspired by a question on StackOverflow.

Install with npm.

npm install shader
var shader = require('shader');
 
var newShade = shader(color, value);
paramtypedescription
colorstringthe seven character hex code for the color
valuenumbera range from -1.0 (darkest) to 1.0 (lightest)

Note: The color input must be exactly 7 characters, e.g., #08a35c.


Built with care in New Orleans by Patrick Burtchaell.

Copyright 2015 Patrick Burtchaell. Licensed MIT.