JSPM

  • Created
  • Published
  • Downloads 409449
  • Score
    100M100P100Q212233F
  • License MIT

Collection of color space conversions

Package Exports

  • color-space
  • color-space/cmyk
  • color-space/cmyk.js
  • color-space/cubehelix
  • color-space/cubehelix.js
  • color-space/hsl
  • color-space/hsl.js
  • color-space/hsv
  • color-space/hsv.js
  • color-space/hwb.js
  • color-space/index.js
  • color-space/lab
  • color-space/lab.js
  • color-space/lchab
  • color-space/lchab.js
  • color-space/lchuv.js
  • color-space/rgb
  • color-space/rgb.js
  • color-space/xyy
  • color-space/xyy.js
  • color-space/xyz
  • color-space/xyz.js
  • color-space/yuv
  • color-space/yuv.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (color-space) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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,

🕉