{"name":"color-space","description":"Collection of color space conversions","version":"2.0.0","author":{"name":"Dmitry Ivanov","email":"df.creative@gmail.com"},"type":"module","keywords":["color","colour","rgb","hsl","hsv","lab","lch","luv","lch","cie","hsluv","husl","color-convert","gamut","color-conversions","color-space","color-translation","color-data","coloroid","cubehelix","munsell","hcg","hsp"],"repository":{"type":"git","url":"git+ssh://git@github.com/colorjs/color-space.git"},"license":"MIT","main":"./index.js","devDependencies":{"almost-equal":"^1.1.0","rollup":"^2.66.0","terser":"^5.10.0","uvu":"^0.5.3"},"scripts":{"test":"node test","build":"rollup ./index.js --file dist/color-space.js --format esm","minify":"terser ./dist/color-space.js -o ./dist/color-space.min.js --module -c passes=3 -m"},"gitHead":"2381db0a5f2b6919e4ed85b53652650b2bdca973","bugs":{"url":"https://github.com/colorjs/color-space/issues"},"homepage":"https://github.com/colorjs/color-space#readme","_id":"color-space@2.0.0","_nodeVersion":"16.13.2","_npmVersion":"8.3.0","dist":{"integrity":"sha512-Bu8P/usGNuVWushjxcuaGSkhT+L2KX0cvgMGMTF0KJ7lFeqonhsntT68d6Yu3uwZzCmbF7KTB9EV67AGcUXhJw==","shasum":"ae7813abcbe3dabda9e3e2266b0675f688b24977","tarball":"http://registry-npm.ywwl.com/color-space/download/color-space-2.0.0.tgz","fileCount":44,"unpackedSize":167585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh71mdCRA9TVsSAnZWagAAon0P/1m0hG3LPhmPsZtsHlff\nilR+pGuu+HjAGUE3UjyjWIBRR7aMn36dpGXNqkRtpoUa6IgjizCtIE0QkYIT\nse9JAfKXn0Sz/TekeFL34Ro04NuR2reI0dPvkahvW8g0SbKrzGT83G8spydo\ntw28iNmkq2z65xgB0Ihd/KSXTNwK228yTtQfc8RaULQ9RKX+q1AQGfCdK/Rv\nO7oQFUCQtyrWyYvaIPmO/A9lZJrvM4pKEw6R9mlTpuqEHrf5fGSxs2gY9Kg1\nlwOPAl9OsbbYGC24R2c3W1XEZAeonsa6dZqiXgagSG6DPrJZIBRXNTwwbPEf\nc+aXPTsy82f4EInH5ZDOtRtSZPpVBs6tUzBg4+8HtRS2kpwF6EmxdUdRqFMJ\nwTGBdIonjJDGcRfsZxd5ETwFjgpf90HCRDvRBCw2xIbT8OTyyuvfV/O0gjBk\n8qs6ap68HXsvUFaUwP8BZAMwSTlJ66NAUsBX308y7BFTjicT8eZveOwApi0V\ncZSoddxJ3qD4SYKCv1gxPPQqv7NcE1eBcg5lQerTGbMDSiV6olZw88YMF13L\nMKn9lFm2zCftBb9aIaC9a7fKQl8J2RvyrndpP2gAAxGD1yjc9MH6QeSdYNwM\nExB9UOFRpxovGTKoYyOiOJRx/zDXqabtwDRcRRI+yMMUO7CP9YpmXgDPQqEf\nrB8A\r\n=Spn/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHYJewnJNl9BePTDcDn43bBTdv7WxML79e8D2NJrL8csAiAs059axVOy6stTzTQnbgg05FnU2uwUsiiobA8J9VQrRw=="}],"size":52871,"noattachment":false,"key":"/color-space/-/color-space-2.0.0.tgz"},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},{"name":"jaspervdg","email":"th.v.d.gronde@hccnet.nl"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"hughsk","email":"hughskennedy@gmail.com"},{"name":"substack","email":"substack@gmail.com"},{"name":"rreusser","email":"rsreusser@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/color-space_2.0.0_1643075997160_0.7638436931659374"},"_hasShrinkwrap":false,"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":1643075997291,"_cnpm_publish_time":1643075997291,"dist-tags":{"latest":"3.6.0","next":"3.5.0"}}