node package manager


Create a darker or lighter shade of a color.


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);
param type description
color string the seven character hex code for the color
value number a 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.