Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

colorjs/color-space

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

384 Commits

Repository files navigation

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,

Support

See supported versions, migration.

🕉

About

Math & data behind color spaces and color conversions.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 16

AltStyle によって変換されたページ (->オリジナル) /