color-measure

    1.0.1 • Public • Published

    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

    Install

    npm i color-measure

    DownloadsWeekly Downloads

    216

    Version

    1.0.1

    License

    MIT

    Last publish

    Collaborators

    • dfcreative