Package Exports
- color-space
- color-space/cmyk
- color-space/hsl
- color-space/hsv
- color-space/lab
- color-space/lchab
- color-space/rgb
- color-space/xyz
- color-space/yuv
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


Conversions and data for color spaces. Demo.
Usage
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
<fromSpace>.<toSpace>(array);
<space>.name //space name
<space>.min //channel minimums
<space>.max //channel maximums
<space>.channel //channel names
<space>.alias //alias space names
Spaces
- RGB
- HSL
- HSV, HSB
- HWB
- HSI
- CMYK
- CMY
- XYZ
- XYY (YXY)
- LAB
- LCHab
- LUV
- LCHuv
- HuSL
- HuSLp
- LABHunter
- YUV
- YIQ
- YCgCo
- YDbDr
- YPbPr
- YCbCr
- YcCbcCrc
- JPEG
- XvYCC
- UVW
- Munsell
- NCS
- PMS
- RAL
- TSL
- RG
- Coloroid
- HKS
- LMS
- cubehelix
- gray
- CIECAM02
- ITU
- REC709
- SMTPE
- NTSC
- GREY
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.