Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/matthewmueller/color
- Owner: matthewmueller
- Created: 2012-11-13T00:47:05.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2012-11-13T01:13:46.000Z (almost 12 years ago)
- Last Synced: 2024-04-08T20:09:56.331Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 105 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- Changelog: History.md
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