{"_id":"@csstools/convert-colors","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"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"],"dist-tags":{"latest":"2.0.1"},"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"description":"Convert colors between RGB, HEX, HSL, HWB, LAB, LCH, and more","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\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://csstools.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\n[Convert Colors]: https://github.com/csstools/convert-colors\n","repository":{"type":"git","url":"git+https://github.com/csstools/convert-colors.git"},"bugs":{"url":"https://github.com/csstools/convert-colors/issues"},"license":"CC0-1.0","versions":{"1.3.0":{"name":"@csstools/convert-colors","version":"1.3.0","keywords":["colors","converts","css","rgb","hsl","hwb","red","green","blue","hue","saturation","lightness","whiteness","blackness"],"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","_id":"@csstools/convert-colors@1.3.0","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"dist":{"shasum":"471eeea45a24c4778f53cd2c906fbc52d4c71065","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/@csstools/convert-colors/-/convert-colors-1.3.0.tgz","integrity":"sha512-JZkCfa/U9+WfBSAFESaIq0MHVflyXQZwAB1e7YA3XZ3Kw8J9CBEFQ+Vm7FeK1PcTi8WYbrtlY2Go1tlI9sqbMg==","signatures":[{"sig":"MEUCIQDCgFKkatSxAeFROUka5oX5y+CQ75APl/kjmkcGohsG6AIgSmkfkE8uO0F4FGR6l6z86JacCKRvyM28/x5bPoP/ym8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.bundle.js","files":["index.js","index.bundle.js","lib"],"module":"index.js","engines":{"node":">=4.0.0"},"gitHead":"76a261322f7667681a3d32591f48524d98f9c18c","scripts":{"test":"echo 'Running tests...'; npm run test:ec && npm run test:js && npm run test:tape","pretest":"rollup -c .rollup.js --silent","test:ec":"echint test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape","prepublishOnly":"npm test"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"repository":{"url":"git+https://github.com/jonathantneal/convert-colors.git","type":"git"},"_npmVersion":"5.6.0","description":"Convert colors between RGB, HSL, and HWB","directories":{},"_nodeVersion":"9.3.0","eslintConfig":{"rules":{"max-params":[2,4]},"extends":"dev"},"devDependencies":{"echint":"^4.0","eslint":"^4.15","rollup":"^0.54","babel-core":"^6.26.0","pre-commit":"^1.2","babel-preset-env":"^1.6","eslint-config-dev":"2.0","rollup-plugin-babel":"^3.0"},"_npmOperationalInternal":{"tmp":"tmp/convert-colors-1.3.0.tgz_1516932631667_0.8631520196795464","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@csstools/convert-colors","version":"2.0.0","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"],"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","_id":"@csstools/convert-colors@2.0.0","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"dist":{"shasum":"6dd323583b40cfe05aaaca30debbb30f26742bbf","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/@csstools/convert-colors/-/convert-colors-2.0.0.tgz","fileCount":8,"integrity":"sha512-P7BVvddsP2Wl5v3drJ3ArzpdfXMqoZ/oHOV/yFiGFb3JQr9Z9UXZ9tnHAKJsO89lfprR1F9ExW3Yij21EjEBIA==","signatures":[{"sig":"MEUCIAWHVi778utM9Mrr/q5YdsNLVsEni5REKL8nd1RfbebgAiEAtKLFjAO5w25N+tM2q+nW8lUL8/xd8lYk10QAiR9c5Vs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":202180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUGlCCRA9TVsSAnZWagAAJjwP/A/NXtjK7fcolqD6edra\nFblKvBKB82LJzkh2ocEGFeFfI5YGF10pVz96bbRIj2bif2r9dalh4VmwjW0V\n2ZRkO/nG6KoWL+TmE3RLjcvLNOKILsA87SFAgpy4hflb9oSx3rCc8F0xjzMd\nOmaZp+Ocxfxy+LFQD0ch8EhNu7BP9uV0oDV3U7yFHsy2oAFbiPtFPesHscDl\nVPOYglSwCu97eoFzWO3xFVBs6BMDyKoXhHgD1MlgJBt7a/xPo52JVEcGamAN\n0TDrn4K6tC18JxsVJa6TCKb+/vKhDVmGE4JwySf5dbc5ac4HseBYPk1GUDJO\nEisskqHkE+pOkEPRumdlW/9ulBjV3mv3PU7OebQ0PIU+oLi0DiRAoqwtO5hK\nJfF+AIppORW5pa3zsNQ7KfzwH5Y70rcWAqOeY55epZqFKAqVJLlBS2oKAhtD\nSxaCCMLZubzgPVa2BJ/MS9D9MUsohB7AYbMMvy0yarA8sbnOkxVhe02WMva1\nrJo5oApmxNNe9i2Y8bUrXvJ7O4LZyoGUeeDngelbgFAtIBEisJEuivQ3A57u\nFY+vn+LCoRB8UmW7DiJFnEJkoTUcJ1ZkWtb73/wBxON1n4TO4DWjbUzwXeXC\n189hVxrKIVRw1Ps1IZJhz4gHUc7mO2B5CuvQCdWRk/b5FKaCtrwVlyFJ7Hkf\nfnJP\r\n=qQ++\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","module":"index.mjs","engines":{"node":">=6.0.0"},"gitHead":"273fa68a1aecac8bf72f2dae8abeca5302d8666d","scripts":{"docs":"jsdoc -c .jsdocrc -d .gh-pages","test":"npm run test:ec && npm run test:js && npm run test:tape","build":"rollup -c .rollup.js --silent","pretest":"npm run build","test:ec":"echint test","test:js":"eslint src/*.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape","prepublishOnly":"npm test"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"repository":{"url":"git+https://github.com/jonathantneal/convert-colors.git","type":"git"},"_npmVersion":"6.5.0","description":"Convert colors between RGB, HEX, HSL, HWB, LAB, LCH, and more","directories":{},"_nodeVersion":"11.6.0","eslintConfig":{"rules":{"max-params":[2,4]},"extends":"dev"},"_hasShrinkwrap":false,"devDependencies":{"jsdoc":"^3.5.5","echint":"^4.0.1","eslint":"^5.12.1","rollup":"^1.1.2","docdash":"^1.0.2","pre-commit":"^1.2.2","@babel/core":"^7.2.2","@babel/preset-env":"^7.3.1","eslint-config-dev":"^2.0.0","rollup-plugin-babel":"^4.3.2","rollup-plugin-terser":"^4.0.3"},"_npmOperationalInternal":{"tmp":"tmp/convert-colors_2.0.0_1548773697697_0.4679727970300991","host":"s3://npm-registry-packages"}},"1.4.0":{"name":"@csstools/convert-colors","version":"1.4.0","keywords":["colors","converts","conversions","converting","css","rgb","hsl","hwb","lab","lch","hsv","xyz","red","green","blue","hue","saturation","lightness","whiteness","blackness","cie"],"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","_id":"@csstools/convert-colors@1.4.0","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"dist":{"shasum":"ad495dc41b12e75d588c6db8b9834f08fa131eb7","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/@csstools/convert-colors/-/convert-colors-1.4.0.tgz","integrity":"sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==","signatures":[{"sig":"MEYCIQDCObNbkIRk2LbkPRKrwQxaF7ZDuEVSFcCuE9t43ItKrgIhANxbNFvGkNGXD+a2yHHn6l0asQzK+PrFy1/I+emEAGQ6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.bundle.js","files":["index.js","index.bundle.js","lib"],"module":"index.js","engines":{"node":">=4.0.0"},"gitHead":"fd2a201643ca9e8a54738164d09b11018713fd5e","scripts":{"test":"echo 'Running tests...'; npm run test:ec && npm run test:js && npm run test:tape","pretest":"rollup -c .rollup.js --silent","test:ec":"echint test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape","prepublishOnly":"npm test"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"repository":{"url":"git+https://github.com/jonathantneal/convert-colors.git","type":"git"},"_npmVersion":"5.6.0","description":"Convert colors between RGB, HSL, and HWB","directories":{},"_nodeVersion":"9.3.0","eslintConfig":{"rules":{"max-params":[2,4]},"extends":"dev"},"devDependencies":{"echint":"^4.0","eslint":"^4.15","rollup":"^0.54","babel-core":"^6.26.0","pre-commit":"^1.2","babel-preset-env":"^1.6","eslint-config-dev":"2.0","rollup-plugin-babel":"^3.0"},"_npmOperationalInternal":{"tmp":"tmp/convert-colors-1.4.0.tgz_1517099089723_0.5687820876482874","host":"s3://npm-registry-packages"}},"2.0.1":{"name":"@csstools/convert-colors","version":"2.0.1","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/csstools/convert-colors.git"},"homepage":"https://github.com/csstools/convert-colors#readme","bugs":{"url":"https://github.com/csstools/convert-colors/issues"},"main":"index.js","module":"index.mjs","scripts":{"build":"rollup -c .rollup.mjs --silent","docs":"jsdoc -c .jsdocrc -d .gh-pages","prepublishOnly":"npm test","pretest":"npm run build","test":"node .tape"},"engines":{"node":">=6.0.0"},"devDependencies":{"@babel/core":"^7.29.0","@babel/preset-env":"^7.29.0","rollup":"^4.58.0","@rollup/plugin-babel":"^6.1.0","@rollup/plugin-terser":"^0.4.4"},"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"],"_id":"@csstools/convert-colors@2.0.1","gitHead":"0bd4db0378645ddeb61d7822857c2377a45979a6","_nodeVersion":"22.14.0","_npmVersion":"10.8.3","dist":{"integrity":"sha512-lKYHgl0GbLX/e5P3xu0dA5nmvUWGaD5QuBX2f0y/uReRHAAycK2DMEK5yYprXrRMTQ4rxN4NQmmKl6Uylretlw==","shasum":"d40800958656d96e43f8f73e2583eadfc5685d57","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/@csstools/convert-colors/-/convert-colors-2.0.1.tgz","fileCount":7,"unpackedSize":209857,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC5uoz4nSzI/4qD7/1yl+osF3j7Km0JH8P+0FSsu3MMjwIgUuXD0r8/mR7etfL936G+0FvHHojjl80n93B/lhCRzWI="}]},"_npmUser":{"name":"romainmenke","email":"romainmenke@gmail.com"},"directories":{},"maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},{"name":"alaguna","email":"sombragriselros@gmail.com"},{"name":"romainmenke","email":"romainmenke@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/convert-colors_2.0.1_1771706970094_0.8924958506325209"},"_hasShrinkwrap":false},"1.0.0":{"name":"@csstools/convert-colors","version":"1.0.0","keywords":["colors","converts","css","rgb","hsl","hwb","red","green","blue","hue","saturation","lightness","whiteness","blackness"],"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","_id":"@csstools/convert-colors@1.0.0","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"dist":{"shasum":"43c3c47c0df5f393aea6d8cd350f79c0ac46928f","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/@csstools/convert-colors/-/convert-colors-1.0.0.tgz","integrity":"sha512-P25ay88RAgUDUeIvRdHckKQkSPOMVpenDjdEt44CFmghuRqCcZ5E1JyCoog2rs3MqMkmzlOS22QJwXmkl75mSw==","signatures":[{"sig":"MEUCIQCFK1znMknLRYs+T93c4WrvPcEivoOavOr19cGNxExVpQIgcHBC3/3vTvgsbUrUPKGFLHF5M1YWm10Zoofo5QdHvhA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.bundle.js","files":["index.js","index.bundle.js"],"module":"index.js","engines":{"node":">=4.0.0"},"gitHead":"e75e53817049fbdcb0165eee54d9d7131932dd02","scripts":{"test":"echo 'Running tests...'; npm run test:ec && npm run test:js && npm run test:tape","pretest":"rollup -c .rollup.js --silent","test:ec":"echint test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape","prepublishOnly":"npm test"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"repository":{"url":"git+https://github.com/jonathantneal/convert-colors.git","type":"git"},"_npmVersion":"5.6.0","description":"Convert colors between RGB, HSL, and HWB","directories":{},"_nodeVersion":"9.3.0","eslintConfig":{"rules":{"max-params":[2,4]},"extends":"dev"},"devDependencies":{"echint":"^4.0","eslint":"^4.15","rollup":"^0.54","babel-core":"^6.26.0","pre-commit":"^1.2","babel-preset-env":"^1.6","eslint-config-dev":"2.0","rollup-plugin-babel":"^3.0"},"_npmOperationalInternal":{"tmp":"tmp/convert-colors-1.0.0.tgz_1516629246893_0.11699264426715672","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@csstools/convert-colors","version":"1.1.0","keywords":["colors","converts","css","rgb","hsl","hwb","red","green","blue","hue","saturation","lightness","whiteness","blackness"],"author":{"name":"Jonathan Neal","email":"jonathantneal@hotmail.com"},"license":"CC0-1.0","_id":"@csstools/convert-colors@1.1.0","maintainers":[{"name":"jonathantneal","email":"jonathantneal@hotmail.com"}],"homepage":"https://github.com/jonathantneal/convert-colors#readme","bugs":{"url":"https://github.com/jonathantneal/convert-colors/issues"},"dist":{"shasum":"9b70719808f7394dfa27c730c5745de4a6109835","tarball":"https://devel.data-in-motion.biz/nexus/repository/npm-group/@csstools/convert-colors/-/convert-colors-1.1.0.tgz","integrity":"sha512-ywkyHWAbyygoZJYd7Rsq2EL06vZrAYwJ4hkzMrWereaiPlrY7D9iFPidemc0+McmCgxnHF5heKGmlgSHQ8coxQ==","signatures":[{"sig":"MEUCIQCRB7vCz+t7UhNiKZtdfMmWEuIW1TOj5aMUlrI4iG46TwIgG2M5JQnizYgU0VcSgVn8fmXeE7HqDvSBsAT2Yc9vvzk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.bundle.js","_from":".","files":["index.js","index.bundle.js"],"module":"index.js","_shasum":"9b70719808f7394dfa27c730c5745de4a6109835","engines":{"node":">=4.0.0"},"gitHead":"615ad0d490410504bfb0965b2dce80dd3be1bd4a","scripts":{"test":"echo 'Running tests...'; npm run test:ec && npm run test:js && npm run test:tape","pretest":"rollup -c .rollup.js --silent","test:ec":"echint test","test:js":"eslint *.js --cache --ignore-path .gitignore --quiet","test:tape":"node .tape","prepublishOnly":"npm test"},"_npmUser":{"name":"jonathantneal","email":"jonathantneal@hotmail.com"},"repository":{"url":"git+https://github.com/jonathantneal/convert-colors.git","type":"git"},"_npmVersion":"2.14.2","description":"Convert colors between RGB, HSL, and HWB","directories":{},"_nodeVersion":"4.0.0","eslintConfig":{"rules":{"max-params":[2,4]},"extends":"dev"},"devDependencies":{"echint":"^4.0","eslint":"^4.15","rollup":"^0.54","babel-core":"^6.26.0","pre-commit":"^1.2","babel-preset-env":"^1.6","eslint-config-dev":"2.0","rollup-plugin-babel":"^3.0"},"_npmOperationalInternal":{"tmp":"tmp/convert-colors-1.1.0.tgz_1516638361362_0.44780057203024626","host":"s3://npm-registry-packages"}}},"name":"@csstools/convert-colors","time":{"1.3.0":"2018-01-26T02:10:32.547Z","2.0.0":"2019-01-29T14:54:57.806Z","1.4.0":"2018-01-28T00:24:50.658Z","2.0.1":"2026-02-21T20:49:30.263Z","created":"2018-01-22T13:54:07.968Z","modified":"2026-03-22T22:08:20.405Z","1.0.0":"2018-01-22T13:54:07.968Z","1.1.0":"2018-01-22T16:26:02.357Z"},"readmeFilename":"README.md","homepage":"https://github.com/csstools/convert-colors#readme"}