Skip to content
Creates darker or lighter shades of a hex code color
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.babelrc
.gitignore
.npmignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json
yarn.lock

README.md

Color Shader

npm version Build Status npm downloads

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

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.

You can’t perform that action at this time.