{"_id":"@laverdet/lokesh-quantize","_rev":"1-789bf4bc6189de7146c9d14f303f7b11","name":"@laverdet/lokesh-quantize","dist-tags":{"latest":"1.2.0"},"versions":{"1.2.0":{"name":"@laverdet/lokesh-quantize","version":"1.2.0","description":"A node.js module for color quantization, based on Leptonica.","homepage":"https://github.com/olivierlesnicki/quantize","author":{"name":"Olivier Lesnicki","url":"https://github.com/olivierlesnicki"},"keywords":["image","quantize","color","node"],"contributors":[{"name":"Nick Rabinowitz","url":"https://github.com/nrabinowitz"},{"name":"Olivier Lesnicki","url":"https://github.com/olivierlesnicki"}],"license":{"type":"MIT","url":"http://github.com/olivierlesnicki/quantize/raw/master/LICENSE"},"source":"src/quantize.js","main":"dist/index.js","module":"dist/index.mjs","scripts":{"build":"microbundle --no-compress --no-sourcemap","watch":"microbundle --no-compress --no-sourcemap watch"},"dependencies":{},"devDependencies":{"microbundle":"^0.11.0"},"gitHead":"f572abd2646b5944852535c8a26fdb958a5d7c4b","_id":"@laverdet/lokesh-quantize@1.2.0","_nodeVersion":"16.6.1","_npmVersion":"7.20.3","dist":{"integrity":"sha512-erw2r+guWPGjcKOAsRTEuwNy2iLEH+elkAsVAPZZNh2larGmEWuBUszbYIf42HnVuF8BGSRjE0nBYErC8lfo3g==","shasum":"673d450b40e728c0b1592fbd19312b512087a5b7","tarball":"https://registry.npmjs.org/@laverdet/lokesh-quantize/-/lokesh-quantize-1.2.0.tgz","fileCount":7,"unpackedSize":62191,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQPPJCRA9TVsSAnZWagAAqS8P/ida9nYxZE8/Bn3zbPDm\nhBlhSXF2zIMmvK/4v7rf4N6O+g6qUxKxJzg91HdxIhOqEEOXfPuI4+cqPVGh\n5ThuQg/kf9v7euCDeLMcci/B5zpIiNEurGY89MRRSDYWTRjoYbVDgu3HWiRp\ni5BkRST4M4JKI5ijTXspNBSCd1Q0fAb8UYVhsuRu1VOUyWEe7t9RkRemNYJq\nR/QyjCsRlsXlf7UWMf/gggCCk5ivKcfvdPrw7UEkTzWLFYQIAepiMceFu/E3\n/4+m65AsxG43Z8U7KoNYplQI382iMbLNMrEQ+Yj7YLIwbt0dMSfsnGWKoSgo\n/XSrnYo6PvgZBQ+xbSDCDbhqyJzZvxA+anRegP91vtEzuRDhBYotGSLaJLj0\nZ/mvuaig+GGj9BIkVAQYQHWU2/PASTxNt5CqJDHxwbRvfwl7BX2Ool2lx+UJ\n4lZcjP6zGpHaeSErQtKH27iFt0AndFLbrAhy9EQB5oiG33npQ+rlZ/As6xGW\nzulfdYxPv2E+nMwxOFp5irpKinrnjogFnDEHVhE5yTD1vMKTeKKF7Wt8r5/R\nsHQ0wQLPlhXhdjsDEbXfhoauu1Oe7dgrFj5dsAUn7AeBirumPs6c1ygvInqY\n1MFdKICdH4GG8I1Mn9WPfcMvehdORlfIROvvT3oLAxleUUkw4+hHFrxbNZOF\ncPR+\r\n=e//b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWjE7i5RAJ6qGKksRYHLFDZM5vTQydO6xbuiDH+sTrZAiEA2e6KM0T7Q36XEY0NaqG9fbHQ/M8j3glyXcivF19OUOE="}]},"_npmUser":{"name":"laverdet","email":"marcel.npm@laverdet.com"},"directories":{},"maintainers":[{"name":"laverdet","email":"marcel.npm@laverdet.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/lokesh-quantize_1.2.0_1631646665398_0.10180992473404338"},"_hasShrinkwrap":false}},"time":{"created":"2021-09-14T19:11:05.310Z","1.2.0":"2021-09-14T19:11:05.601Z","modified":"2022-04-06T00:53:19.257Z"},"maintainers":[{"name":"laverdet","email":"marcel.npm@laverdet.com"}],"description":"A node.js module for color quantization, based on Leptonica.","homepage":"https://github.com/olivierlesnicki/quantize","keywords":["image","quantize","color","node"],"contributors":[{"name":"Nick Rabinowitz","url":"https://github.com/nrabinowitz"},{"name":"Olivier Lesnicki","url":"https://github.com/olivierlesnicki"}],"author":{"name":"Olivier Lesnicki","url":"https://github.com/olivierlesnicki"},"license":{"type":"MIT","url":"http://github.com/olivierlesnicki/quantize/raw/master/LICENSE"},"readme":"quantize\n========\n\nNode.js module for color quantization, based on Leptonica.\n\n\nInstall\n-------\n\n\tnpm install quantize\n\nQuick Overview\n--------------\n\n### Usage\n\n`````javascript\nvar quantize = require('quantize');\n\nvar arrayOfPixels = [[190,197,190], [202,204,200], [207,214,210], [211,214,211], [205,207,207]];\nvar maximumColorCount = 4;\n\nvar colorMap = quantize(arrayOfPixels, maximumColorCount);\n`````\n\n* `arrayOfPixels` - An array of pixels (represented as [R,G,B arrays]) to quantize\n* `maxiumColorCount` - The maximum number of colours allowed in the reduced palette\n\n##### Reduced Palette\n\nThe `.palette()` method returns an array that contains the reduced color palette.\n\n`````javascript\n// Returns the reduced palette\ncolorMap.palette(); \n// [[204, 204, 204], [208,212,212], [188,196,188], [212,204,196]]\n`````\n\n##### Reduced pixel\n\nThe `.map(pixel)` method maps an individual pixel to the reduced color palette.\n\n`````javascript\n// Returns the reduced pixel\ncolorMap.map(arrayOfPixels[0]);\n// [188,196,188]\n`````\n\nAuthor\n------\n\n* [Olivier Lesnicki](https://github.com/olivierlesnicki)\n\nContributors\n------------\n\n* [Nick Rabinowitz](https://github.com/nrabinowitz)\n* [Mike Bostock](https://github.com/mbostock)\n\nLicense\n-------\n\nLicensed under the MIT License.\n","readmeFilename":"README.md"}