1.0.0 • Published 6 years ago

shader v1.0.0

Weekly downloads
1,453
License
MIT
Repository
github
Last release
6 years ago

Color Shader

npm version Dependency Status Build Status

Creates darker or lighter shades of a hex color. Originally inspired from a question on StackOverflow.

Installation

Install with npm.

npm install shader

Usage

import shader from 'shader';

const color = '#fff';
const myNewShade = shader(color, -1.0);

Parameters

paramtypedescription
colorstringthe hex code for the color
valueinta range from -1.0 (darkest) to 1.0 (lightest)

Copyright 2015-2017 Patrick Burtchaell. Licensed MIT.