Need help with color-space?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

colorjs
233 Stars 19 Forks The Unlicense 263 Commits 18 Opened issues

Description

Math & data behind color spaces and color conversions.

Services available

!
?

Need anything else?

Contributors list

Color-space Build Status stable OpenCollective OpenCollective

Conversions and data for color spaces. Demo.

Usage

npm install color-space

var space = require('color-space');

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

You can require a separate space to reduce size significantly:

var rgb = require('color-space/rgb');
var hsl = require('color-space/hsl');

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

API

.(array);
.name //space name
.min //channel minimums
.max //channel maximums
.channel //channel names
.alias //alias space names

Spaces

Contribute

Please fork, add color space with basic conversions to/from XYZ or RGB and tests. The goal of project is to provide the most complete set of color spaces with maximally minimal uniform API.

Credits

Thanks to all the color scientists, who devoted their lives to color research and delivered their knowledge to us, for now we can trust them and use their formulas and their code.

Backers

Support us with a monthly donation and help us continue our activities. [Become a backer]

Sponsors

Become a sponsor and get your logo on our README on Github with a link to your site. [Become a sponsor]

Related

  • colormap — collection of colormaps to map colors of images/data. A replacement for visualising spaces like cubehelix.
  • color-spectrum — convert spectrum to a color.
  • color-interpolate — interpolate between color values.
  • color-tool — color picker based on color-space.

Similar projects

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.