{"name":"color-space","description":"Math & data behind color spaces and color conversions.","version":"0.3.3","author":{"name":"Deema Ywanow","email":"dfcreative@gmail.com"},"repository":{"type":"git","url":"http://github.com/dfcreative/color-space.git"},"main":"./index","devDependencies":{"mumath":"~0.x","mocha":"*","browserify":"~6.x","assert":"~1.x","closurecompiler":"~1.x","require-stub":"~1.x","query-relative":"~1.x"},"keywords":["color","colour","rgb","hsl","hsv","lab","lch","luv","cie","husl","color-convert","gamut","color-conversions","color-space","color-translation","color-data"],"scripts":{"test":"mocha","build":"browserify --standalone color ./index.js > dist/color.js","min":"ccjs dist/color.js --language_in=ECMASCRIPT5 > dist/color.min.js && cat dist/color.min.js | gzip-size | pretty-bytes","build-test":"browserify -r assert -r mumath -r query-relative -r ./index.js:../index > test/test.bundle.js"},"bugs":{"url":"https://github.com/dfcreative/color-space/issues"},"homepage":"https://github.com/dfcreative/color-space","_id":"color-space@0.3.3","dist":{"shasum":"3702b6684e063f95abe103a5037bdb92d0f139aa","tarball":"http://registry-npm.ywwl.com/color-space/download/color-space-0.3.3.tgz","integrity":"sha512-J4NpMJAjYe+hFn9b5mMQgsxlZBPXpxxvctZ7q6gf6O9Je7VMkd2xZZGO9ib/eJnz7obOcMdUoDLss8dOQcfV4A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDnBDJ116BjvuLd5YxKzPh+FVDvKS5lAAGZ1USPoDDwgIhAP9Qdjsf+PXoydwyiSfluTAC+GmBWUoU6wtGJa4nd9Ez"}],"size":58683,"noattachment":false,"key":"/color-space/-/color-space-0.3.3.tgz"},"_from":".","_npmVersion":"1.3.24","_npmUser":{"name":"dfcreative","email":"df.creative@gmail.com"},"maintainers":[{"name":"dfcreative","email":"df.creative@gmail.com"}],"directories":{},"readme":"# Color-space [![test](https://github.com/colorjs/color-space/actions/workflows/test.yml/badge.svg)](https://github.com/colorjs/color-space/actions/workflows/test.yml) [![stable](https://img.shields.io/badge/stability-stable-brightgreen.svg)](http://github.com/badges/stability-badges) [![npm](https://img.shields.io/npm/v/color-space)](https://npmjs.org/color-space) [![size](https://img.shields.io/bundlephobia/minzip/color-space/latest)](https://bundlephobia.com/package/color-space)\n\n<img src=\"https://raw.githubusercontent.com/colorjs/color-space/gh-pages/logo.png\" width=\"100%\" height=\"150\"/>\n\nCollection of color spaces conversions & data.\n\n[Demo](http://colorjs.github.io/color-space).\n\n\n## Usage\n\n```js\nimport space from 'color-space';\n\n//convert lab to lch\nvar result = space.lab.lch([80,50,60]);\n```\n\nSpaces can be imported separately:\n\n```js\nimport rgb from 'color-space/rgb.js';\nimport hsl from 'color-space/hsl.js';\n\n//convert rgb to hsl\nrgb.hsl([200,230,100]);\n```\n<!--\nNew space can be registered as:\n```js\nimport space, {register} from 'color-space';\n\nregister(spaceDefiniton)\n``` -->\n\n## API\n\n```js\n<fromSpace>.<toSpace>(array);\n<space>.name //space name\n<space>.min //channel minimums\n<space>.max //channel maximums\n<space>.channel //channel names\n<space>.alias //alias space names\n```\n\n## Spaces\n\n* [x] [RGB](https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_RGB_colour_space) — additive color model based on red, green and blue primary colors.\n* [x] [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) — cylindrical-coordinates representation of RGB.\n* [x] [HSV, HSB](https://en.wikipedia.org/wiki/HSL_and_HSV)\n* [x] [HWB](http://dev.w3.org/csswg/css-color/#the-hwb-notation)\n* [x] [HSI](https://en.wikipedia.org/wiki/HSL_and_HSV) — used for computer vision due to better separation of shapes in an image, comparing to HSL/HSB.\n* [x] [CMYK](https://en.wikipedia.org/wiki/CMYK_color_model)\n* [x] [CMY](https://en.wikipedia.org/wiki/CMYK_color_model)\n* [x] [XYZ](http://en.wikipedia.org/wiki/CIE_1931_color_space)\n* [x] [XYY (YXY)](https://en.wikipedia.org/wiki/CIE_1931_color_space#CIE_xy_chromaticity_diagram_and_the_CIE_xyY_color_space)\n* [x] [LAB](http://en.wikipedia.org/wiki/Lab_color_space)\n* [x] [LCH<sub>ab</sub>](https://en.wikipedia.org/wiki/Lab_color_space#Cylindrical_representation:_CIELCh_or_CIEHLC)\n* [x] [LUV](http://en.wikipedia.org/wiki/CIELUV)\n* [x] [LCH<sub>uv</sub>](http://en.wikipedia.org/wiki/CIELUV#Cylindrical_representation)\n* [x] [HSL<sub>uv</sub>](http://www.hsluv.org/)\n* [x] [HPL<sub>uv</sub>](http://www.hsluv.org/)\n* [x] [LAB<sub>Hunter</sub>](http://en.wikipedia.org/wiki/Lab_color_space#Hunter_Lab)\n* [x] [YUV](https://en.wikipedia.org/?title=YUV)\n* [x] [YIQ](https://en.wikipedia.org/?title=YIQ)\n* [x] [YC<sub>g</sub>C<sub>o</sub>](https://en.wikipedia.org/wiki/YCgCo)\n* [x] [YD<sub>b</sub>D<sub>r</sub>](https://en.wikipedia.org/wiki/YDbDr)\n* [x] [YP<sub>b</sub>P<sub>r</sub>](https://en.wikipedia.org/wiki/YPbPr)\n* [x] [YC<sub>b</sub>C<sub>r</sub>](https://en.wikipedia.org/wiki/YCbCr)\n* [x] [Y<sub>c</sub>C<sub>bc</sub>C<sub>rc</sub>](https://en.wikipedia.org/wiki/YCbCr#ITU-R_BT.2020_conversion)\n* [x] [JPEG](https://en.wikipedia.org/wiki/YCbCr#JPEG_conversion)\n* [x] [XvYCC](https://en.wikipedia.org/wiki/XvYCC)\n* [x] [UCS](https://en.wikipedia.org/wiki/CIE_1960_color_space)\n* [x] [UVW](https://en.wikipedia.org/wiki/CIE_1964_color_space)\n* [ ] [Munsell](https://en.wikipedia.org/wiki/Munsell_color_system)\n* [ ] [NCS](https://en.wikipedia.org/wiki/Natural_Color_System)\n* [ ] [PMS](https://en.wikipedia.org/wiki/Pantone)\n* [ ] [RAL](https://en.wikipedia.org/wiki/RAL_colour_standard)\n* [ ] [TSL](https://en.wikipedia.org/wiki/TSL_color_space)\n* [ ] [RG](https://en.wikipedia.org/wiki/RG_color_space)\n* [ ] [RGK](https://en.wikipedia.org/wiki/RG_color_space)\n* [x] [Coloroid](https://en.wikipedia.org/wiki/Coloroid) — color space for architects and visual constructors, Hungarian Standard MSZ 7300 since 2000.\n* [ ] [OSA-UCS](https://en.wikipedia.org/wiki/OSA-UCS) — accurately reprsenting uniform color differences, developed by the Optical Society of America’s Committee on Uniform Color Scales.\n* [ ] [HKS](https://en.wikipedia.org/wiki/HKS_(colour_system))\n* [x] [LMS](http://en.wikipedia.org/wiki/LMS_color_space) — represents sensitivity of the human eye to Long, Medium and Short wavelengths.\n* [x] [Cubehelix](https://www.mrao.cam.ac.uk/~dag/CUBEHELIX/) — colormaps for data visualization.\n* [ ] [Gray](http://dev.w3.org/csswg/css-color/#grays)\n* [ ] [CIECAM02](https://en.wikipedia.org/wiki/CIECAM02)\n* [ ] [US Federal Standard 595](https://en.wikipedia.org/wiki/Federal_Standard_595)\n* [ ] [Toyo](http://mytoyocolor.com/)\n* [ ] [PhotoYCC](http://www5.informatik.tu-muenchen.de/lehre/vorlesungen/graphik/info/csc/COL_34.htm)\n* [x] [HCG](https://github.com/acterhd/hcg-legacy)\n* [ ] [HCL](http://www.chilliant.com/rgb2hsv.html)\n* [x] [HSP](http://alienryderflex.com/hsp.html)\n* [ ] [HCY](http://chilliant.blogspot.ca/2012/08/rgbhcy-in-hlsl.html)\n* [x] [YES](http://www.atlantis-press.com/php/download_paper.php?id=198) — computationally effective color space for face recognition.\n* [ ] [British Standard Colour](http://www.britishstandardcolour.com/)\n* [ ] [RG chromacity](https://en.wikipedia.org/wiki/Rg_chromaticity)\n* [ ] [CIE DSH](https://en.wikipedia.org/wiki/Rg_chromaticity)\n* [ ] [HSM](http://seer.ufrgs.br/rita/article/viewFile/rita_v16_n2_p141/7428)\n\n## Contribute\n\nPlease fork, add color space with basic _conversions_ to/from XYZ or RGB and _tests_.\nThe goal of the project is the most complete set of color spaces with minimal uniform API.\n\n\n## Credits\n\nThanks to all scientists, who devoted their time to color research and conveyed their knowledge, for now we can use their formulas and code.\n\n\n## Alternatives\n\n* [color-convert](https://github.com/harthur/color-convert)\n* [chromatist](https://github.com/jrus/chromatist)\n* [spectra](https://github.com/avp/spectra)\n* [colorspaces.js](https://github.com/boronine/colorspaces.js)\n\n## See also\n\n* [color-api](https://github.com/LeaVerou/color-api) - color API proposal by Lea Verou\n","publish_time":1417190634198,"_cnpm_publish_time":1417190634198,"dist-tags":{"latest":"3.6.0","next":"3.5.0"}}