color-space
TypeScript icon, indicating that this package has built-in type declarations

2.3.2 • Public • Published

Color-space test stable npm size

Open collection of color spaces.

Demo.

Usage

import space from 'color-space';

//convert lab to lch
var result = space.lab.lch([80,50,60]);

Spaces can be imported separately:

import rgb from 'color-space/rgb.js';
import hsl from 'color-space/hsl.js';

//convert rgb to hsl
rgb.hsl([200, 230, 100]);

API

<fromSpace>.<toSpace>(array);
<space>.name //space name
<space>.channel //channel names
<space>.min //channel minimums
<space>.max //channel maximums

Spaces

Purpose

A complete collection of color spaces with minimal consistent and clean API, verified formulas and cases. While alternatives focus on digital color spaces, this project takes broader perspective, including historical / multidisciplinary spaces. A side effect is verifying and correcting papers.

Credits

Thanks to all who contribute to color science – researchers, scientists, color theorists, specifiers, implementors, developers, and users.

Similar

culori, colorjs.io, color-api, texel/color,

🕉

/color-space/

    Package Sidebar

    Install

    npm i color-space

    Weekly Downloads

    427,805

    Version

    2.3.2

    License

    Unlicense

    Unpacked Size

    197 kB

    Total Files

    91

    Last publish

    Collaborators

    • mikolalysenko
    • jaspervdg
    • dfcreative
    • hughsk
    • rreusser
    • dy