{"_id":"@csstools/convert-colors","_rev":"322961","name":"@csstools/convert-colors","description":"Convert colors between RGB, HEX, HSL, HWB, LAB, LCH, and more","dist-tags":{"latest":"2.0.0"},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"time":{"modified":"2021-06-04T01:29:45.000Z","created":"2018-01-22T13:54:07.968Z","2.0.0":"2019-01-29T14:54:57.806Z","1.4.0":"2018-01-28T00:24:50.658Z","1.3.0":"2018-01-26T02:10:32.547Z","1.1.0":"2018-01-22T16:26:02.357Z","1.0.0":"2018-01-22T13:54:07.968Z"},"users":{},"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"repository":{"type":"git","url":"git+https://github.com/jonathantneal/convert-colors.git"},"versions":{"2.0.0":{"name":"@csstools/convert-colors","version":"2.0.0","description":"Convert colors between RGB, HEX, HSL, HWB, LAB, LCH, and more","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/jonathantneal/convert-colors.git"},"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"main":"index.js","module":"index.mjs","scripts":{"build":"rollup -c .rollup.js --silent","docs":"jsdoc -c .jsdocrc -d .gh-pages","prepublishOnly":"npm test","pretest":"npm run build","test":"npm run test:ec && npm run test:js && npm run test:tape","test:ec":"echint test","test:js":"eslint src/*.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape"},"engines":{"node":">=6.0.0"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.3.1","docdash":"^1.0.2","echint":"^4.0.1","eslint":"^5.12.1","eslint-config-dev":"^2.0.0","jsdoc":"^3.5.5","pre-commit":"^1.2.2","rollup":"^1.1.2","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^4.0.3"},"eslintConfig":{"extends":"dev","rules":{"max-params":[2,4]}},"keywords":["colors","contrast","conversions","converting","converts","hex","hsl","hsv","hwb","lab","lch","rgb","xyz","blue","green","red","blackness","hue","lightness","saturation","whiteness","cie","ciede2000","contrast","wcag"],"gitHead":"273fa68a1aecac8bf72f2dae8abeca5302d8666d","_id":"@csstools/convert-colors@2.0.0","_npmVersion":"6.5.0","_nodeVersion":"11.6.0","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"6dd323583b40cfe05aaaca30debbb30f26742bbf","size":47062,"noattachment":false,"key":"/@csstools/convert-colors/-/@csstools/convert-colors-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@csstools/convert-colors/download/@csstools/convert-colors-2.0.0.tgz"},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/convert-colors_2.0.0_1548773697697_0.4679727970300991"},"_hasShrinkwrap":false,"publish_time":1548773697806,"_cnpm_publish_time":1548773697806},"1.4.0":{"name":"@csstools/convert-colors","version":"1.4.0","description":"Convert colors between RGB, HSL, and HWB","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/jonathantneal/convert-colors.git"},"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"main":"index.bundle.js","module":"index.js","files":["index.js","index.bundle.js","lib"],"scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"echo 'Running tests...'; npm run test:ec && npm run test:js && npm run test:tape","test:ec":"echint test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape"},"engines":{"node":">=4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-env":"^1.6","echint":"^4.0","eslint":"^4.15","eslint-config-dev":"2.0","pre-commit":"^1.2","rollup":"^0.54","rollup-plugin-babel":"^3.0"},"eslintConfig":{"extends":"dev","rules":{"max-params":[2,4]}},"keywords":["colors","converts","conversions","converting","css","rgb","hsl","hwb","lab","lch","hsv","xyz","red","green","blue","hue","saturation","lightness","whiteness","blackness","cie"],"gitHead":"fd2a201643ca9e8a54738164d09b11018713fd5e","_id":"@csstools/convert-colors@1.4.0","_npmVersion":"5.6.0","_nodeVersion":"9.3.0","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"ad495dc41b12e75d588c6db8b9834f08fa131eb7","size":13675,"noattachment":false,"key":"/@csstools/convert-colors/-/@csstools/convert-colors-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@csstools/convert-colors/download/@csstools/convert-colors-1.4.0.tgz"},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/convert-colors-1.4.0.tgz_1517099089723_0.5687820876482874"},"directories":{},"publish_time":1517099090658,"_hasShrinkwrap":false,"_cnpm_publish_time":1517099090658},"1.3.0":{"name":"@csstools/convert-colors","version":"1.3.0","description":"Convert colors between RGB, HSL, and HWB","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/jonathantneal/convert-colors.git"},"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"main":"index.bundle.js","module":"index.js","files":["index.js","index.bundle.js","lib"],"scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"echo 'Running tests...'; npm run test:ec && npm run test:js && npm run test:tape","test:ec":"echint test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape"},"engines":{"node":">=4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-env":"^1.6","echint":"^4.0","eslint":"^4.15","eslint-config-dev":"2.0","pre-commit":"^1.2","rollup":"^0.54","rollup-plugin-babel":"^3.0"},"eslintConfig":{"extends":"dev","rules":{"max-params":[2,4]}},"keywords":["colors","converts","css","rgb","hsl","hwb","red","green","blue","hue","saturation","lightness","whiteness","blackness"],"gitHead":"76a261322f7667681a3d32591f48524d98f9c18c","_id":"@csstools/convert-colors@1.3.0","_npmVersion":"5.6.0","_nodeVersion":"9.3.0","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"471eeea45a24c4778f53cd2c906fbc52d4c71065","size":10920,"noattachment":false,"key":"/@csstools/convert-colors/-/@csstools/convert-colors-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@csstools/convert-colors/download/@csstools/convert-colors-1.3.0.tgz"},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/convert-colors-1.3.0.tgz_1516932631667_0.8631520196795464"},"directories":{},"publish_time":1516932632547,"_hasShrinkwrap":false,"_cnpm_publish_time":1516932632547},"1.1.0":{"name":"@csstools/convert-colors","version":"1.1.0","description":"Convert colors between RGB, HSL, and HWB","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/jonathantneal/convert-colors.git"},"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"main":"index.bundle.js","module":"index.js","files":["index.js","index.bundle.js"],"scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"echo 'Running tests...'; npm run test:ec && npm run test:js && npm run test:tape","test:ec":"echint test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape"},"engines":{"node":">=4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-env":"^1.6","echint":"^4.0","eslint":"^4.15","eslint-config-dev":"2.0","pre-commit":"^1.2","rollup":"^0.54","rollup-plugin-babel":"^3.0"},"eslintConfig":{"extends":"dev","rules":{"max-params":[2,4]}},"keywords":["colors","converts","css","rgb","hsl","hwb","red","green","blue","hue","saturation","lightness","whiteness","blackness"],"gitHead":"615ad0d490410504bfb0965b2dce80dd3be1bd4a","_id":"@csstools/convert-colors@1.1.0","_shasum":"9b70719808f7394dfa27c730c5745de4a6109835","_from":".","_npmVersion":"2.14.2","_nodeVersion":"4.0.0","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"9b70719808f7394dfa27c730c5745de4a6109835","size":6474,"noattachment":false,"key":"/@csstools/convert-colors/-/@csstools/convert-colors-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@csstools/convert-colors/download/@csstools/convert-colors-1.1.0.tgz"},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/convert-colors-1.1.0.tgz_1516638361362_0.44780057203024626"},"directories":{},"publish_time":1516638362357,"_hasShrinkwrap":false,"_cnpm_publish_time":1516638362357},"1.0.0":{"name":"@csstools/convert-colors","version":"1.0.0","description":"Convert colors between RGB, HSL, and HWB","author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","repository":{"type":"git","url":"git+https://github.com/jonathantneal/convert-colors.git"},"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"main":"index.bundle.js","module":"index.js","files":["index.js","index.bundle.js"],"scripts":{"prepublishOnly":"npm test","pretest":"rollup -c .rollup.js --silent","test":"echo 'Running tests...'; npm run test:ec && npm run test:js && npm run test:tape","test:ec":"echint test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape"},"engines":{"node":">=4.0.0"},"devDependencies":{"babel-core":"^6.26.0","babel-preset-env":"^1.6","echint":"^4.0","eslint":"^4.15","eslint-config-dev":"2.0","pre-commit":"^1.2","rollup":"^0.54","rollup-plugin-babel":"^3.0"},"eslintConfig":{"extends":"dev","rules":{"max-params":[2,4]}},"keywords":["colors","converts","css","rgb","hsl","hwb","red","green","blue","hue","saturation","lightness","whiteness","blackness"],"gitHead":"e75e53817049fbdcb0165eee54d9d7131932dd02","_id":"@csstools/convert-colors@1.0.0","_npmVersion":"5.6.0","_nodeVersion":"9.3.0","_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"dist":{"shasum":"43c3c47c0df5f393aea6d8cd350f79c0ac46928f","size":6458,"noattachment":false,"key":"/@csstools/convert-colors/-/@csstools/convert-colors-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@csstools/convert-colors/download/@csstools/convert-colors-1.0.0.tgz"},"maintainers":[{"name":"alaguna","email":"a.laguna@funcion13.com"},{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/convert-colors-1.0.0.tgz_1516629246893_0.11699264426715672"},"directories":{},"publish_time":1516629247968,"_hasShrinkwrap":false,"_cnpm_publish_time":1516629247968}},"readme":"# Convert Colors [<img src=\"https://cdn.worldvectorlogo.com/logos/nodejs-icon.svg\" alt=\"Convert Colors\" width=\"90\" height=\"90\" align=\"right\">][Convert Colors]\n\n[![NPM Version][npm-img]][npm-url]\n[![Linux Build Status][cli-img]][cli-url]\n[![Windows Build Status][win-img]][win-url]\n\n[Convert Colors] converts colors between RGB, HEX, HSL, HWB, LAB, LCH, and more.\n\n```js\nimport convert from '@csstools/convert-colors';\n\nconvert.rgb2hsl(100, 100, 100); // [ 0, 0, 100 ]\nconvert.rgb2hwb(100, 100, 100); // [ 0, 100, 0 ]\n\nconvert.hsl2rgb(0, 0, 100); // [ 0, 100, 0 ]\nconvert.hsl2hwb(0, 0, 100); // [ 0, 100, 0 ]\n\nconvert.hwb2rgb(0, 100, 0); // [ 0, 0, 100 ]\nconvert.hwb2hsl(0, 100, 0); // [ 0, 0, 100 ]\n\nconvert.rgb2hue(0, 0, 100); // 240\n\nconvert.rgb2contrast([100, 100, 100], [0, 0, 0]); // 21\nconvert.rgb2ciede2000([100, 100, 100], [0, 0, 0]); // 100\n```\n\n## Usage\n\nAdd [Convert Colors] to your build tool:\n\n```bash\nnpm install @csstools/convert-colors --save-dev\n```\n\n## Features\n\nConversions work by taking arguments that represents a color in one color space\nand returning an array of that same color in another color space.\n\n[Documentation](https://jonathantneal.github.io/convert-colors/)\n\n[npm-url]: https://www.npmjs.com/package/@csstools/convert-colors\n[npm-img]: https://img.shields.io/npm/v/@csstools/convert-colors.svg\n[cli-url]: https://travis-ci.org/jonathantneal/convert-colors\n[cli-img]: https://img.shields.io/travis/jonathantneal/convert-colors.svg\n[win-url]: https://ci.appveyor.com/project/jonathantneal/convert-colors\n[win-img]: https://img.shields.io/appveyor/ci/jonathantneal/convert-colors.svg\n\n[Convert Colors]: https://github.com/jonathantneal/convert-colors\n","_attachments":{},"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"license":"CC0-1.0"}