Color-space

Open collection of color spaces.
Demo.
Usage
import space from 'color-space';
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';
rgb.hsl([200, 230, 100]);
API
<fromSpace>.<toSpace>(array);
<space>.name
<space>.channel
<space>.min
<space>.max
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,
🕉