{"id":20349168,"url":"https://github.com/mage2pro/color","last_synced_at":"2025-04-12T01:22:53.322Z","repository":{"id":57015976,"uuid":"203515870","full_name":"mage2pro/color","owner":"mage2pro","description":"A product color categorization module for Magento 2","archived":false,"fork":false,"pushed_at":"2024-06-09T11:06:12.000Z","size":61,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T21:07:35.291Z","etag":null,"topics":["google-api","google-cloud-vision","image-analysis","image-classification","mage2pro","mage2pro-ai","mage2pro-module","mage2pro-module-ready","mage2pro-module-reusable","magento","magento2","magento2-extension","magento2-module"],"latest_commit_sha":null,"homepage":"https://upwork.com/fl/mage2pro","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mage2pro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-21T05:54:03.000Z","updated_at":"2025-01-21T11:49:41.000Z","dependencies_parsed_at":"2024-06-09T12:24:00.395Z","dependency_job_id":null,"html_url":"https://github.com/mage2pro/color","commit_stats":{"total_commits":86,"total_committers":1,"mean_commits":86.0,"dds":0.0,"last_synced_commit":"dc86301131608a405a8219826833da5d6455ae47"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mage2pro%2Fcolor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mage2pro%2Fcolor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mage2pro%2Fcolor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mage2pro%2Fcolor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mage2pro","download_url":"https://codeload.github.com/mage2pro/color/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248502154,"owners_count":21114751,"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":["google-api","google-cloud-vision","image-analysis","image-classification","mage2pro","mage2pro-ai","mage2pro-module","mage2pro-module-ready","mage2pro-module-reusable","magento","magento2","magento2-extension","magento2-module"],"created_at":"2024-11-14T22:24:27.540Z","updated_at":"2025-04-12T01:22:53.300Z","avatar_url":"https://github.com/mage2pro.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"A product image color categorization module for Magento 2.  \nThe module is **free** and **open source**.  \nIt uses the Google's [Cloud Vision API](https://cloud.google.com/vision) (based on deep learning) to [detect the dominant color](https://cloud.google.com/vision/docs/detecting-properties) of a product's primary image, and then it automatically assigns the proper [color swatch](https://docs.magento.com/m2/ce/user_guide/catalog/swatches.html) to the product.\n\nWhen a product is saved, the module checks whether the product is a configurable child.  \nIf so, the module checks whether the product's base image was changed.\nIf so, the module analyses the image's colors using Google Cloud Vision API:\n![](https://mage2.pro/uploads/default/original/2X/e/e61b9b1633bdefa4e954fcf1f48171b21c815bfa.png)    \nThen the module calculates the difference between the primary color and all swatches using the [Delta E (CIE 2000)](http://www.brucelindbloom.com/index.html?Eqn_DeltaE_CIE2000.html) algorithm.  \nSometimes the algorithm does not produce the result you want.\nIn this case, you can correct the algorithm by specifying additional swatches for a desired color:\n![](https://mage2.pro/uploads/default/original/2X/3/3b1463c1ad75180b1884818285d6c387a31c5117.png)  \nThe module uses all samples in a color distance calculation and picks the minimum result as the distance between the swatch and the product image's dominant color.\nThe module has a tesing sandbox.\nPut test images to the `pub/media/mage2pro` folder, and then go to the `/mage2pro-color` page.\nThe sandbox will show what the module thinks about the images colors:\n![](https://mage2.pro/uploads/default/original/2X/5/547942b73174491bcd7b8de56e5975ca8d087e38.png)  \nPlease note that the module uses only color of the `color` Magento product attribute, so to make the module operate more colors, just add more swatches to the `color` attribute.\n\nThe module requires [Google Application credentials](https://cloud.google.com/vision/docs/quickstart-client-libraries). Put them to the `app/etc/google-app-credentials.json` file.\n\n## How to install\n[Hire me in Upwork](https://upwork.com/fl/mage2pro), and I will: \n- install and configure the module properly on your website\n- answer your questions\n- solve compatiblity problems with third-party checkout, shipping, marketing modules\n- implement new features you need \n\n### 2. Self-installation\n```\nbin/magento maintenance:enable\nrm -f composer.lock\ncomposer clear-cache\ncomposer require mage2pro/color:*\nbin/magento setup:upgrade\nbin/magento cache:enable\nrm -rf var/di var/generation generated/code\nbin/magento setup:di:compile\nrm -rf pub/static/*\nbin/magento setup:static-content:deploy -f en_US \u003cadditional locales\u003e\nbin/magento maintenance:disable\n```\n\n## How to upgrade\n```\nbin/magento maintenance:enable\ncomposer remove mage2pro/color\nrm -f composer.lock\ncomposer clear-cache\ncomposer require mage2pro/color:*\nbin/magento setup:upgrade\nrm -rf var/di var/generation generated/code\nbin/magento setup:di:compile\nrm -rf pub/static/*\nbin/magento setup:static-content:deploy -f en_US \u003cadditional locales\u003e\nbin/magento maintenance:disable\nbin/magento cache:enable\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmage2pro%2Fcolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmage2pro%2Fcolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmage2pro%2Fcolor/lists"}