{"id":13566384,"url":"https://github.com/ded/color-thief","last_synced_at":"2025-04-04T00:30:37.661Z","repository":{"id":17585897,"uuid":"20389427","full_name":"ded/color-thief","owner":"ded","description":"Grabs the dominant color or a representative color palette from an image. Uses javascript and canvas.","archived":false,"fork":true,"pushed_at":"2014-04-17T18:42:20.000Z","size":1514,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-04T20:42:27.917Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"lokesh/color-thief","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ded.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-02T00:21:47.000Z","updated_at":"2023-06-10T06:36:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ded/color-thief","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2Fcolor-thief","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2Fcolor-thief/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2Fcolor-thief/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ded%2Fcolor-thief/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ded","download_url":"https://codeload.github.com/ded/color-thief/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247103305,"owners_count":20884023,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:02:08.467Z","updated_at":"2025-04-04T00:30:37.182Z","avatar_url":"https://github.com/ded.png","language":"JavaScript","funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"#Color Thief\n\nA script for grabbing the color palette from an image. Uses Javascript and the canvas tag to make it happen.\n\n[See a Demo](http://lokeshdhakar.com/projects/color-thief) | [Read more on my blog](http://lokeshdhakar.com/color-thief)\n\n##How to use\n\n###Get the dominant color from an image\n```js\nvar colorThief = new ColorThief();\ncolorThief.getColor(sourceImage);\n```\n\n```js\ngetColor(sourceImage[, quality])\nreturns {r: num, g: num, b: num}\n```\n\n###Build a color palette from an image\n\nIn this example, we build an 8 color palette.\n\n```js\nvar colorThief = new ColorThief();\ncolorThief.getPalette(sourceImage, 8);\n```\n\n```js\ngetPalette(sourceImage[, colorCount, quality])\nreturns [ [num, num, num], [num, num, num], ... ]\n```\n\n##Credits and license\n\n###Author\nby Lokesh Dhakar  \n[lokeshdhakar.com](http://www.lokeshdhakar.com)  \n[twitter.com/lokesh](http://twitter.com/lokesh)\n\n###Thanks\n* Nick Rabinowitz - For creating quantize.js.\n* John Schulz - For clean up and optimization. @JFSIII\n* Nathan Spady - For adding drag and drop support to the demo page.\n\n###License\nLicensed under the [Creative Commons Attribution 2.5 License](http://creativecommons.org/licenses/by/2.5/)\n\n* Free for use in both personal and commercial projects.\n* Attribution requires leaving author name, author homepage link, and the license info intact.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fded%2Fcolor-thief","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fded%2Fcolor-thief","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fded%2Fcolor-thief/lists"}