Skip to content
This repository has been archived by the owner on Apr 26, 2023. It is now read-only.

colorjs/color-measure

Repository files navigation

color-measure Build Status Code Climate

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.

NPM

Releases

No releases published

Packages

No packages published