{"_id":"colorthief","_rev":"3332354","name":"colorthief","description":"Get the dominant color or color palette from an image.","dist-tags":{"latest":"2.4.0"},"maintainers":[{"name":"lokesh.dhakar","email":""}],"time":{"modified":"2024-07-10T07:28:20.000Z","created":"2017-11-27T02:36:08.549Z","2.4.0":"2023-02-28T22:13:54.690Z","2.3.2":"2020-07-06T04:32:18.763Z","2.3.1":"2020-07-06T02:42:18.229Z","2.3.0":"2019-08-04T15:56:28.606Z","2.2.1":"2019-07-22T14:37:31.937Z","2.2.0":"2019-07-15T03:14:10.812Z","2.1.0":"2019-07-14T16:47:20.695Z","2.0.2":"2017-11-27T02:36:08.549Z"},"users":{},"author":{"name":"Lokesh Dhakar","email":"lokesh.dhakar@gmail.com","url":"http://lokeshdhakar.com/"},"repository":{"type":"git","url":"git+https://github.com/lokesh/color-thief.git"},"versions":{"2.4.0":{"name":"colorthief","version":"2.4.0","author":{"name":"Lokesh Dhakar","email":"lokesh.dhakar@gmail.com","url":"http://lokeshdhakar.com/"},"description":"Get the dominant color or color palette from an image.","keywords":["color","palette","sampling","image","picture","photo","canvas"],"homepage":"http://lokeshdhakar.com/projects/color-thief/","repository":{"type":"git","url":"git+https://github.com/lokesh/color-thief.git"},"license":"MIT","source":"src/color-thief.js","main":"dist/color-thief.js","module":"dist/color-thief.mjs","umd:main":"dist/color-thief.umd.js","amdName":"ColorThief","scripts":{"build":"microbundle --no-sourcemap && node ./build/build.js","watch":"microbundle watch --no-sourcemap","dev":"http-server","test":"mocha && cypress run --config video=false","test:browser":"cypress run --headed --browser chrome","test:node":"mocha","cypress":"cypress open"},"devDependencies":{"@node-minify/core":"^4.0.5","@node-minify/uglify-es":"^4.0.5","chai":"^4.2.0","chai-as-promised":"^7.1.1","cypress":"^12.6.0","eslint":"^5.16.0","http-server":"^0.11.1","microbundle":"^0.15.0","mocha":"^6.2.0","mustache":"^3.0.1"},"dependencies":{"@lokesh.dhakar/quantize":"^1.3.0","get-pixels":"^3.3.2"},"gitHead":"4dc3bb0b43250f0d006278998aa91c4156f77cc3","bugs":{"url":"https://github.com/lokesh/color-thief/issues"},"_id":"colorthief@2.4.0","_nodeVersion":"18.14.0","_npmVersion":"9.3.1","dist":{"shasum":"74e6edd142695655bd5f52c7f8116b125ea2b2bd","size":423458,"noattachment":false,"key":"/colorthief/-/colorthief-2.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/colorthief/download/colorthief-2.4.0.tgz"},"_npmUser":{"name":"lokesh.dhakar","email":"lokesh.dhakar@gmail.com"},"directories":{},"maintainers":[{"name":"lokesh.dhakar","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/colorthief_2.4.0_1677622434469_0.09458627324729729"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2023-02-28T22:13:54.690Z","publish_time":1677622434690,"_cnpm_publish_time":1677622434690},"2.3.2":{"name":"colorthief","version":"2.3.2","author":{"name":"Lokesh Dhakar","email":"lokesh.dhakar@gmail.com","url":"http://lokeshdhakar.com/"},"description":"Get the dominant color or color palette from an image.","keywords":["color","palette","sampling","image","picture","photo","canvas"],"homepage":"http://lokeshdhakar.com/projects/color-thief/","repository":{"type":"git","url":"git+https://github.com/lokesh/color-thief.git"},"license":"MIT","source":"src/color-thief.js","main":"dist/color-thief.js","module":"dist/color-thief.mjs","umd:main":"dist/color-thief.umd.js","amdName":"ColorThief","scripts":{"build":"microbundle --no-sourcemap && node ./build/build.js","watch":"microbundle watch --no-sourcemap","dev":"http-server","test":"mocha && cypress run --config video=false","test:browser":"cypress open","test:node":"mocha"},"devDependencies":{"@node-minify/core":"^4.0.5","@node-minify/uglify-es":"^4.0.5","chai":"^4.2.0","chai-as-promised":"^7.1.1","cypress":"^3.4.0","eslint":"^5.16.0","http-server":"^0.11.1","microbundle":"^0.11.0","mocha":"^6.2.0","mustache":"^3.0.1"},"dependencies":{"get-pixels":"^3.3.2","quantize":"github:lokesh/quantize"},"gitHead":"ef231c711309dc32be1efa83bd4da7c0ed21cd6e","bugs":{"url":"https://github.com/lokesh/color-thief/issues"},"_id":"colorthief@2.3.2","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"shasum":"00b984f421abe5a2af71c4d464c9d80d407fd53d","size":421879,"noattachment":false,"key":"/colorthief/-/colorthief-2.3.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/colorthief/download/colorthief-2.3.2.tgz"},"maintainers":[{"name":"lokesh.dhakar","email":""}],"_npmUser":{"name":"lokesh.dhakar","email":"lokesh.dhakar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/colorthief_2.3.2_1594009938531_0.12875240804434362"},"_hasShrinkwrap":false,"publish_time":1594009938763,"_cnpm_publish_time":1594009938763,"_cnpmcore_publish_time":"2021-12-18T20:16:56.835Z"},"2.3.1":{"name":"colorthief","version":"2.3.1","author":{"name":"Lokesh Dhakar","email":"lokesh.dhakar@gmail.com","url":"http://lokeshdhakar.com/"},"description":"Get the dominant color or color palette from an image.","keywords":["color","palette","sampling","image","picture","photo","canvas"],"homepage":"http://lokeshdhakar.com/projects/color-thief/","repository":{"type":"git","url":"git+https://github.com/lokesh/color-thief.git"},"license":"MIT","source":"src/color-thief.js","main":"dist/color-thief.js","module":"dist/color-thief.mjs","umd:main":"dist/color-thief.umd.js","amdName":"ColorThief","scripts":{"build":"microbundle --no-sourcemap && node ./build/build.js","watch":"microbundle watch --no-sourcemap","dev":"http-server","test":"mocha && cypress run --config video=false","test:browser":"cypress open","test:node":"mocha"},"devDependencies":{"@node-minify/core":"^4.0.5","@node-minify/uglify-es":"^4.0.5","chai":"^4.2.0","chai-as-promised":"^7.1.1","cypress":"^3.4.0","eslint":"^5.16.0","http-server":"^0.11.1","microbundle":"^0.11.0","mocha":"^6.2.0","mustache":"^3.0.1"},"dependencies":{"get-pixels":"^3.3.2","quantize":"github:lokesh/quantize"},"gitHead":"4858a208d7f1b23002087d5859437f14277de13e","bugs":{"url":"https://github.com/lokesh/color-thief/issues"},"_id":"colorthief@2.3.1","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"shasum":"80064e803dab5c49f9ebe50244c23d629ccd2100","size":421853,"noattachment":false,"key":"/colorthief/-/colorthief-2.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/colorthief/download/colorthief-2.3.1.tgz"},"maintainers":[{"name":"lokesh.dhakar","email":""}],"_npmUser":{"name":"lokesh.dhakar","email":"lokesh.dhakar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/colorthief_2.3.1_1594003338023_0.21368491635650688"},"_hasShrinkwrap":false,"publish_time":1594003338229,"_cnpm_publish_time":1594003338229,"_cnpmcore_publish_time":"2021-12-18T20:16:57.208Z"},"2.3.0":{"name":"colorthief","version":"2.3.0","author":{"name":"Lokesh Dhakar","email":"lokesh.dhakar@gmail.com","url":"http://lokeshdhakar.com/"},"description":"Get the dominant color or color palette from an image.","keywords":["color","palette","sampling","image","picture","photo","canvas"],"homepage":"http://lokeshdhakar.com/projects/color-thief/","repository":{"type":"git","url":"git+https://github.com/lokesh/color-thief.git"},"license":"MIT","source":"src/color-thief.js","main":"dist/color-thief.js","module":"dist/color-thief.mjs","umd:main":"dist/color-thief.umd.js","amdName":"ColorThief","scripts":{"build":"microbundle --no-sourcemap; node ./build/build.js","watch":"microbundle watch --no-sourcemap","dev":" ./node_modules/http-server/bin/http-server","test":"mocha; ./node_modules/.bin/cypress run --config video=false","test:browser":"cypress open","test:node":"mocha"},"devDependencies":{"@node-minify/core":"^4.0.5","@node-minify/uglify-es":"^4.0.5","chai":"^4.2.0","chai-as-promised":"^7.1.1","cypress":"^3.4.0","eslint":"^5.16.0","http-server":"^0.11.1","microbundle":"^0.11.0","mocha":"^6.2.0","mustache":"^3.0.1"},"dependencies":{"get-pixels":"^3.3.2","quantize":"github:lokesh/quantize"},"gitHead":"043d65307864218eb51b6b54afdaeccda87e3636","bugs":{"url":"https://github.com/lokesh/color-thief/issues"},"_id":"colorthief@2.3.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"shasum":"f1ba6322ff2434f684d248b17a291419a9f78cd5","size":421097,"noattachment":false,"key":"/colorthief/-/colorthief-2.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/colorthief/download/colorthief-2.3.0.tgz"},"maintainers":[{"name":"lokesh.dhakar","email":""}],"_npmUser":{"name":"lokesh.dhakar","email":"lokesh.dhakar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/colorthief_2.3.0_1564934188432_0.8752438155334401"},"_hasShrinkwrap":false,"publish_time":1564934188606,"_cnpm_publish_time":1564934188606,"_cnpmcore_publish_time":"2021-12-18T20:16:57.623Z"},"2.2.1":{"name":"colorthief","version":"2.2.1","author":{"name":"Lokesh Dhakar","email":"lokesh.dhakar@gmail.com","url":"http://lokeshdhakar.com/"},"description":"Get the dominant color or color palette from an image.","keywords":["color","palette","sampling","image","picture","photo","canvas"],"homepage":"http://lokeshdhakar.com/projects/color-thief/","repository":{"type":"git","url":"git+https://github.com/lokesh/color-thief.git"},"license":"MIT","source":"src/color-thief.js","main":"dist/color-thief.js","module":"dist/color-thief.mjs","umd:main":"dist/color-thief.umd.js","amdName":"ColorThief","scripts":{"build":"microbundle; node ./build/build.js","watch":"microbundle watch","dev":" ./node_modules/http-server/bin/http-server","test":"cypress open"},"devDependencies":{"@node-minify/core":"^4.0.5","@node-minify/uglify-es":"^4.0.5","cypress":"^3.4.0","eslint":"^5.16.0","http-server":"^0.11.1","microbundle":"^0.11.0","mustache":"^3.0.1"},"dependencies":{"get-pixels":"^3.3.2","quantize":"github:lokesh/quantize"},"gitHead":"ec98c39d42c1d6db58b988b20c89bb06e1afbf65","bugs":{"url":"https://github.com/lokesh/color-thief/issues"},"_id":"colorthief@2.2.1","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"shasum":"a2631a3c5e73b7b12ecc1a89d8fbc963662c25a5","size":456964,"noattachment":false,"key":"/colorthief/-/colorthief-2.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/colorthief/download/colorthief-2.2.1.tgz"},"maintainers":[{"name":"lokesh.dhakar","email":""}],"_npmUser":{"name":"lokesh.dhakar","email":"lokesh.dhakar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/colorthief_2.2.1_1563806251717_0.2639265847868455"},"_hasShrinkwrap":false,"publish_time":1563806251937,"_cnpm_publish_time":1563806251937,"_cnpmcore_publish_time":"2021-12-18T20:16:58.034Z"},"2.2.0":{"name":"colorthief","version":"2.2.0","author":{"name":"Lokesh Dhakar","email":"lokesh.dhakar@gmail.com","url":"http://lokeshdhakar.com/"},"description":"Get the dominant color or color palette from an image.","keywords":["color","palette","sampling","image","picture","photo","canvas"],"homepage":"http://lokeshdhakar.com/projects/color-thief/","repository":{"type":"git","url":"git+https://github.com/lokesh/color-thief.git"},"license":"MIT","source":"src/color-thief.js","main":"dist/color-thief.js","module":"dist/color-thief.mjs","umd:main":"dist/color-thief.umd.js","amdName":"ColorThief","scripts":{"build":"microbundle; node ./build/build.js","dev":"./node_modules/http-server/bin/http-server","test":"cypress open"},"devDependencies":{"@node-minify/core":"^4.0.5","@node-minify/uglify-es":"^4.0.5","cypress":"^3.4.0","eslint":"^5.16.0","http-server":"^0.11.1","microbundle":"^0.11.0","mustache":"^3.0.1"},"engines":{"node":">=10.15.3"},"gitHead":"f0ae4e6a6b9b8aa8c3a446ac21b75b0a974b967c","bugs":{"url":"https://github.com/lokesh/color-thief/issues"},"_id":"colorthief@2.2.0","_nodeVersion":"12.4.0","_npmVersion":"6.9.0","dist":{"shasum":"ed644b5de186e94f8d302cc35af196fe57770973","size":459182,"noattachment":false,"key":"/colorthief/-/colorthief-2.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/colorthief/download/colorthief-2.2.0.tgz"},"maintainers":[{"name":"lokesh.dhakar","email":""}],"_npmUser":{"name":"lokesh.dhakar","email":"lokesh.dhakar@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/colorthief_2.2.0_1563160450639_0.8740064228151088"},"_hasShrinkwrap":false,"publish_time":1563160450812,"_cnpm_publish_time":1563160450812,"_cnpmcore_publish_time":"2021-12-18T20:16:58.462Z"},"2.1.0":{"name":"colorthief","version":"2.1.0","author":{"name":"Lokesh Dhakar","email":"lokesh.dhakar@gmail.com","url":"http://lokeshdhakar.com/"},"description":"Get the dominant color or color palette from an image.","keywords":["color","palette","sampling","image","picture","photo","canvas"],"homepage":"http://lokeshdhakar.com/projects/color-thief/","repository":{"type":"git","url":"git+https://github.com/lokesh/color-thief.git"},"license":"MIT","scripts":{"build":"node ./build/build.js","dev":"./node_modules/http-server/bin/http-server","test":"cypress open"},"main":"dist/color-thief.min.js","devDependencies":{"@node-minify/core":"^4.0.5","@node-minify/uglify-es":"^4.0.5","cypress":"^3.3.1","eslint":"^5.16.0","http-server":"^0.11.1","mustache":"^3.0.1"},"engines":{"node":">=10.15.3"},"gitHead":"6f5c2c8d7d8a4adc6791518cbd50311aed88d35b","bugs":{"url":"https://github.com/lokesh/color-thief/issues"},"_id":"colorthief@2.1.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.3","_npmUser":{"name":"lokesh.dhakar","email":"lokesh.dhakar@gmail.com"},"dist":{"shasum":"6eca9267a1a9f9db0ec213f045cf86461f8a7e58","size":427049,"noattachment":false,"key":"/colorthief/-/colorthief-2.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/colorthief/download/colorthief-2.1.0.tgz"},"maintainers":[{"name":"lokesh.dhakar","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/colorthief_2.1.0_1563122840463_0.5409941867667365"},"_hasShrinkwrap":false,"publish_time":1563122840695,"_cnpm_publish_time":1563122840695,"_cnpmcore_publish_time":"2021-12-18T20:16:58.821Z"},"2.0.2":{"name":"colorthief","version":"2.0.2","author":{"name":"Lokesh Dhakar","email":"lokesh.dhakar@gmail.com","url":"http://lokeshdhakar.com/"},"description":"Get the dominant color or color palette from an image.","keywords":["color","palette","sampling","image","picture","photo","canvas"],"homepage":"http://lokeshdhakar.com/projects/color-thief/","repository":{"type":"git","url":"git+https://github.com/lokesh/color-thief.git"},"bugs":{"url":"https://github.com/lokesh/color-thief/issues"},"licenses":[{"type":"MIT","url":"https://raw.githubusercontent.com/lokesh/color-thief/master/LICENSE/"}],"main":"dist/color-thief.min.js","devDependencies":{"grunt":"~1.0.1","grunt-contrib-watch":"^1.0.0","grunt-contrib-connect":"^1.0.2","grunt-contrib-uglify":"~2.0.0","grunt-contrib-jshint":"^0.11.2","grunt-jscs":"^1.8.0"},"gitHead":"25876fbaba41867b9e2bc11cb9e263c19a270748","_id":"colorthief@2.0.2","scripts":{},"_shasum":"40feda8b28c2e92aa069954e2627d482f906fa48","_from":".","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"lokesh.dhakar","email":"lokesh.dhakar@gmail.com"},"dist":{"shasum":"40feda8b28c2e92aa069954e2627d482f906fa48","size":401119,"noattachment":false,"key":"/colorthief/-/colorthief-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/colorthief/download/colorthief-2.0.2.tgz"},"maintainers":[{"name":"lokesh.dhakar","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/colorthief-2.0.2.tgz_1511750168098_0.24326248443685472"},"directories":{},"publish_time":1511750168549,"_hasShrinkwrap":false,"_cnpm_publish_time":1511750168549,"_cnpmcore_publish_time":"2021-12-18T20:16:59.134Z"}},"readme":"\n# Color Thief\n\nGrab the color palette from an image using just Javascript.Works in the browser and in Node.\n\n### View the [demo page](https://lokeshdhakar.com/projects/color-thief/) for examples, API docs, and more.\n\n---\n\n## Contributing\n\n### Project structure\n\n+ `build/` - Simple script that copies and renames files into the /dist folder.\n+ `cypress/` - Browsers tests.\n+ `dist/` - Generated distribution files created by [microbundle](https://github.com/developit/microbundle) package and a couple of files copied via build script.\n+ `examples/` - CSS, JS, and Images for the index.html example page.\n+ `src/color-thief-node.js` - Source for the Node (commonjs) compatible version of the script.\n+ `src/color-thief.js` - Source for the browser (ES6, AMD, Global var) compatible version of the script.\n+ `src/core.js` - Functions shared between the node and browser versions of the script.\n+ `test/` - Node integration tests. Uses Chai.\n+ `index.html` - Example page.\n\n### Running tests\n\nThere are two sets of tests:\n\n1. Browser tests run with [Cypress](https://www.cypress.io)\n2. Node tests run with [Karma](https://karma-runner.github.io/latest/index.html) and utilizing [Mocha](https://mochajs.org/)\n\nTo run both the browser and Node tests:\n\n- `npm run dev` to start local server.\n- `npm run test`\n\nTo run just the browser tests with the Cypress UI:\n\n- `npm run dev` to start local server\n- `npm run test:browser`\n\nTo run just the Node tests:\n\n- `npm run test:node`\n\n\n### Adding tests\n\n- Update `cypress/test-pages/index.html` as needed or create a new test page if you need new examples.\n- Add new tests in `cypress/integration/apis_spec.js`\n\n### Making a new release\n\n- Merge `dev` into `master`\n- Pull down `master`\n- Update version number in `src/color-thief.js` and `package.json`\n- Run `npm run build`\n- Commit and push built files back up to `master`\n- Create a new Github release along with tag. Naming convention for both ```v2.8.1```\n- `npm publish`\n","_attachments":{},"homepage":"http://lokeshdhakar.com/projects/color-thief/","bugs":{"url":"https://github.com/lokesh/color-thief/issues"},"license":"MIT"}