Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Extremely basic color tinting component
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

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

Something went wrong with that request. Please try again.