shader

1.0.0 • Public • Published

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

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    5,792
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    5,792
  • 0.1.3
    43
  • 0.1.2
    0
  • 0.1.1
    0
  • 0.1.0
    0

Package Sidebar

Install

npm i shader

Weekly Downloads

4,808

Version

1.0.0

License

MIT

Last publish

Collaborators

  • pburtchaell