https://github.com/barelyhuman/make-tints
The simplest color tone function for JS
https://github.com/barelyhuman/make-tints
color javascript tints tones
Last synced: 5 months ago
JSON representation
The simplest color tone function for JS
- Host: GitHub
- URL: https://github.com/barelyhuman/make-tints
- Owner: barelyhuman
- License: mit
- Created: 2022-04-01T11:38:18.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2023-04-17T01:55:52.000Z (about 3 years ago)
- Last Synced: 2025-03-02T03:52:06.303Z (over 1 year ago)
- Topics: color, javascript, tints, tones
- Language: JavaScript
- Homepage: https://barelyhuman.github.io/make-tints/
- Size: 278 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
The simplest color tone function for JS
[](https://www.npmjs.com/package/make-tints)
[](https://github.com/barelyhuman/make-tints/actions/workflows/ci.yml)
[](https://packagephobia.com/result?p=make-tints)
## Install
```
npm i make-tints
```
[See it in action →](https://barelyhuman.github.io/make-tints)
## Usage
```js
import {tint} from 'make-tints'
const tintBy = tint('#000')
tintBy(-20) //=> 000000 darker tints can be achieved by using negative percentages
tintBy(20) //=> 333333
tintBy(40) //=> 666666
tintBy(60) //=> 999999
```
## License
[MIT](./LICENSE) License © 2022 [Reaper](https://github.com/barelyhuman)