color luminosity tools
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.jshintrc
.tern-project
component.json
license
readme.md

readme.md

deprecated

luminosity

luminosity functions from harthur/color

install

component install ramitos/luminosity

api

The WCAG luminosity of the color. 0 is black, 1 is white.

.luminosity(array: rbg)

The WCAG contrast ratio to another color, from 1 (same color) to 21 (contrast b/w white and black).

.contrast(array: rgb1, array: rgb2)

Get whether the color is "dark"/"light"

.dark(array: rgb) / .light(array: rgb)

license

MIT