Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/matthewmueller/color

Extremely basic color tinting component
https://github.com/matthewmueller/color

Last synced: about 1 month ago
JSON representation

Extremely basic color tinting component

Awesome Lists containing this project

README

        

# color

Extremely basic color tinting component. Based on an answer to the SO question: [Programmatically darken a Hex colour](http://stackoverflow.com/a/1787140/145435)

## Installation

$ component install matthewmueller/color

## Example

```js
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