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

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

Awesome Lists containing this project

README

          



The simplest color tone function for JS

[![NPM version](https://img.shields.io/npm/v/make-tints?color=a1b858&label=)](https://www.npmjs.com/package/make-tints)
[![CI](https://github.com/barelyhuman/make-tints/actions/workflows/ci.yml/badge.svg)](https://github.com/barelyhuman/make-tints/actions/workflows/ci.yml)
[![install size](https://packagephobia.com/badge?p=make-tints)](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)