node package manager
Stop wasting time. Easily manage code sharing in your team. Create a free org »

shader

shader npm version Dependency Status

Overview

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

Installation

Install with npm.

npm install shader

Usage

var shader = require('shader');
 
var newShade = shader(color, value);

Parameters

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.