{"id":15292525,"url":"https://github.com/marvinkweyu/colordetect","last_synced_at":"2025-11-03T03:30:33.797Z","repository":{"id":47452143,"uuid":"184887226","full_name":"MarvinKweyu/ColorDetect","owner":"MarvinKweyu","description":"Image processing: Detect and identify different color objects in an image/video","archived":false,"fork":false,"pushed_at":"2024-08-21T18:14:32.000Z","size":7770,"stargazers_count":22,"open_issues_count":6,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-10T00:04:38.318Z","etag":null,"topics":["color","color-count","color-recognition","colordetect","colorrecognition","detection","image-processing","opencv","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ColorDetect/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarvinKweyu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","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-05-04T11:40:29.000Z","updated_at":"2024-10-24T12:49:58.000Z","dependencies_parsed_at":"2025-01-01T21:12:07.361Z","dependency_job_id":"5f1a9bb8-bcd0-4e8e-b120-45880ef9ac56","html_url":"https://github.com/MarvinKweyu/ColorDetect","commit_stats":{"total_commits":168,"total_committers":6,"mean_commits":28.0,"dds":0.125,"last_synced_commit":"d62605855dea149d38f301d4f255a2c54c2c9494"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarvinKweyu%2FColorDetect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarvinKweyu%2FColorDetect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarvinKweyu%2FColorDetect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarvinKweyu%2FColorDetect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarvinKweyu","download_url":"https://codeload.github.com/MarvinKweyu/ColorDetect/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239406464,"owners_count":19633025,"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":["color","color-count","color-recognition","colordetect","colorrecognition","detection","image-processing","opencv","python"],"created_at":"2024-09-30T16:18:35.931Z","updated_at":"2025-11-03T03:30:33.766Z","avatar_url":"https://github.com/MarvinKweyu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ColorDetect\n\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eColorDetect\u003c/b\u003e\u003cbr\u003e\n  \u003ca href=\"https://colordetect.readthedocs.io/en/latest/\"\u003eDocumentation\u003c/a\u003e |\n  \u003ca href=\"https://pypi.org/project/ColorDetect/\"\u003ePackage\u003c/a\u003e \n  \u003cbr\u003e\u003cbr\u003e\n  \u003cimg src=\"./img/ColorDetect.png\" alt=\"ColorDetect\"\u003e\n\u003c/p\u003e\n\n![Lint workflow](https://github.com/MarvinKweyu/ColorDetect/actions/workflows/lint.yml/badge.svg?branch=master)\n[![PyPI version](https://badge.fury.io/py/ColorDetect.svg)](https://pypi.org/project/ColorDetect/)\n[![Python](https://img.shields.io/badge/python-\u003e=3.6-green)](https://pypi.org/project/ColorDetect/)\n![Package tests](https://github.com/MarvinKweyu/ColorDetect/actions/workflows/package-tests.yml/badge.svg?branch=master)\n[![Downloads](https://pepy.tech/badge/colordetect)](https://pypi.org/project/ColorDetect/)\n[![Documentation Status](https://readthedocs.org/projects/colordetect/badge/?version=master)](https://colordetect.readthedocs.io/en/master/)\n\n\u003e ColorDetect works to recognize and identify different colors in an image or video.\n\n## Installation\n\n```bash\npip install ColorDetect\n```\n\n## Basic Usage\n\n### Images\n\n```python\nfrom colordetect import ColorDetect\n\n\nuser_image = ColorDetect(\u003cpath_to_image\u003e)\n# return dictionary of color count. Do anything with this\nuser_image.get_color_count()\n\n# write color count\nuser_image.write_color_count()\n# optionally, write any text to the image\nuser_image.write_text(text=\"any text\")\n\n# save the image after using either of the options (write_color_count/write_text) or both\nuser_image.save_image(\u003cstorage_path\u003e,\u003cimage_name\u003e)\n\n```\n\nResultant image is stored in the string `storage_path` of choice with the `image_name` which will default to the current location and **out.jpg** respectively by default.\n\n### Videos\n\n```python\nfrom colordetect import VideoColor,col_share\n\nuser_video = VideoColor(\u003cpath_to_video\u003e)\n# return dictionary of color count. Do anything with this result\nuser_video.get_video_frames(progress=True)\n# to order this rather long result and get only a specific number look up the `col_share` module\n```\n\nYou can also get colors at a specific time and extract the frame at that given time. \n\n## Project Documentation\n\nFor further project documentation, visit [ColorDetect's page](https://colordetect.readthedocs.io/en/latest/)\n\n## Contributions\n\nContributions are welcome.\nDo remember to take a look at the project [contribution guidelines](https://github.com/MarvinKweyu/ColorDetect/blob/master/CONTRIBUTING.rst)\n\n### Tests\n\nTo run tests:\n\n```bash\npytest\n```\n\n### Pre-commit\n\nPre-commit hooks are used to automate linting\n\n1. Install the git hook scripts\n   ```shell\n   pre-commit install\n   ```\n\n1. (optional) Run against all the files\n    ```shell\n   pre-commit run --all-files\n   ```\n\nThe installed pre-commit hooks will automatically ensure use of a consistent code format and style whenever one commits\nchanges using git. For full documentation, view the [pre-commit docs](https://pre-commit.com/).\n\n## Hall of Code\n\nTo the amazing human beings and developers that made this possible.\n\n\u003cdiv align=\"center\"\u003e\n    \u003ca href=\"https://github.com/MarvinKweyu/ColorDetect/graphs/contributors\"\u003e\n        \u003cimg alt=\"contributors' avatars\" src=\"https://contrib.rocks/image?repo=MarvinKweyu/ColorDetect\" /\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvinkweyu%2Fcolordetect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarvinkweyu%2Fcolordetect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarvinkweyu%2Fcolordetect/lists"}