Extremely basic color tinting component
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
History.md
Makefile
Readme.md
component.json
index.js
names.js
test.html

Readme.md

color

Extremely basic color tinting component. Based on an answer to the SO question: Programmatically darken a Hex colour

Installation

$ component install matthewmueller/color

Example

var color = require('color'),
    c = 'red';

color.darken(c, .5) // '#ff3232'
color.lighten(c, .5) // '#cd3232'

API

darken(color, val)

Darkens the color by the given val.

lighten(color, val)

Lightens the color by the given val.

License

MIT