tonality
v0.3.0
Published
Some small functions to help build and adjust color tone palettes.
Downloads
8
Readme
Tonality
Some small functions to help build and adjust color tone palettes.
Install
yarn add tonality
npm install tonality --save
<script src="https://unpkg.com/purpose/dist/tonality.js"></script>
(UMD library exposed as `Tonality`)
Example Usage
import {
createTone,
createTones,
createColorScale,
createColorScales,
flattenColorScales,
getLightness,
} from '../src/index'
const colors = {
info: '#3595bb',
danger: '#eb6654',
warning: '#ffbe30',
success: '#88c163',
grey: '#9fa3a7',
}
const colorScales = createColorScales(colors)
const flatColorScales = flattenColorScales(colorScales)
const successTone = createTone(colors.success)
successTone(0) // darkest shade
successTone(0.5) // medium shade
successTone(1) // lightest shade
Running Locally
clone repo
git clone [email protected]:souporserious/tonality.git
move into folder
cd ~/tonality
install dependencies
yarn
run dev mode
yarn dev
open your browser and visit: http://localhost:8080/
Thank You
This article sparked my inspiration for these helpers. Thank you @erikdkennedy!
The code behind this idea was heavily inspired by the Monochrome app. Thank you @jxnblk!