color-measure
v1.0.1
Published
Measure color characteristics
Downloads
913
Maintainers
Readme
color-measure
A collection of color metric functions.
$ npm install color-measure
var luma = require('color-measure/luminance');
luminance(color); //0.78
Metrics
- luminance (aka luminosity) — get relative luminance.
- contrast — measure contrast ratio of two colors.
- level — measure the readability level of two colors, based on contrast ratio.
- is-dark — check whether color is dark via YIQ transform.
- is-light — check whether color is dark via YIQ transform.
- sugest measure
Related
- color-manipulate — a collection of color manipulation functions.
- color-blend — a collection of color blending functions.
- color-space — a collection of color spaces and conversions between them.
- color — color class, exposing metrics as own API.