tonality

0.3.0 • Public • Published

Tonality

npm version Dependency Status styled with prettier

Some small functions to help build and adjust color tone palettes.

tonality

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 git@github.com: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!

Readme

Keywords

none

Package Sidebar

Install

npm i tonality

Weekly Downloads

3

Version

0.3.0

License

MIT

Last publish

Collaborators

  • souporserious