{"id":26151150,"url":"https://github.com/amirbeek/tinttrove","last_synced_at":"2025-04-14T04:54:17.352Z","repository":{"id":271752454,"uuid":"914440919","full_name":"Amirbeek/TintTrove","owner":"Amirbeek","description":"TintTrove is a simple and elegant image color picker tool that extracts dominant colors from uploaded images. The project is powered by a KMeans clustering algorithm and deployed on Heroku.","archived":false,"fork":false,"pushed_at":"2025-02-25T22:01:55.000Z","size":19913,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T18:52:44.459Z","etag":null,"topics":["color-clustering","flask","image-picker","k-means-clustering","python","tailwindcss"],"latest_commit_sha":null,"homepage":"https://tinttrove-66532836a19d.herokuapp.com/","language":"CSS","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/Amirbeek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2025-01-09T15:50:13.000Z","updated_at":"2025-03-18T21:07:39.000Z","dependencies_parsed_at":"2025-01-09T17:42:58.592Z","dependency_job_id":"f12b4e6a-8af4-4db8-ba22-59211e07786c","html_url":"https://github.com/Amirbeek/TintTrove","commit_stats":null,"previous_names":["amirbeek/tinttrove"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amirbeek%2FTintTrove","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amirbeek%2FTintTrove/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amirbeek%2FTintTrove/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Amirbeek%2FTintTrove/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Amirbeek","download_url":"https://codeload.github.com/Amirbeek/TintTrove/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248824693,"owners_count":21167343,"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-clustering","flask","image-picker","k-means-clustering","python","tailwindcss"],"created_at":"2025-03-11T06:29:03.635Z","updated_at":"2025-04-14T04:54:17.343Z","avatar_url":"https://github.com/Amirbeek.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TintTrove\n\nTintTrove is a simple and elegant image color picker tool that extracts dominant colors from uploaded images. Designed to help designers, artists, and developers explore color palettes with ease. The project is powered by a KMeans clustering algorithm and deployed on Heroku.\n[Watch the video](https://amirbekshomurodov.me/my-first-article/Tintrove)\n\n## Features\n- Extracts dominant colors from any uploaded image.\n- Provides HEX and RGB values of colors.\n- Responsive and user-friendly design.\n- Built for seamless performance with minimal load times.\n\n## Algorithm Details\nThe core functionality relies on the following algorithm:\n\n### Color Clustering Algorithm\n```python\ndef get_colors(image, number_of_colors, show_chart=False):\n    if image.shape[2] == 4:\n        image = cv2.cvtColor(image, cv2.COLOR_RGBA2RGB)\n    elif image.shape[2] == 1:\n        image = cv2.cvtColor(image, cv2.COLOR_GRAY2RGB)\n\n    reshaped_image = cv2.resize(image, (600, 400))\n    reshaped_image = reshaped_image.reshape(reshaped_image.shape[0] * reshaped_image.shape[1], 3)\n    clf = KMeans(n_clusters=number_of_colors)\n    labels = clf.fit_predict(reshaped_image)\n    counts = Counter(labels)\n    center_colors = clf.cluster_centers_\n    ordered_colors = [center_colors[i] for i in counts.keys()]\n    hex_colors = [RGB_HEX(ordered_colors[i]) for i in counts.keys()]\n    return hex_colors\n```\n\n### Key Concepts:\n- **KMeans Clustering**: Groups pixels in the image into `number_of_colors` clusters.\n- **OpenCV**: Used for image preprocessing (e.g., resizing, color conversion).\n- **HEX Conversion**: Converts RGB values to HEX codes for easy usage in design tools.\n\n## Deployment\nTintTrove is deployed on **Heroku**, making it accessible anywhere.\n\n### Live Demo\n[Check out TintTrove live on Heroku](https://tinttrove-66532836a19d.herokuapp.com/)\n\n## Installation\n1. Clone the repository:\n   ```bash\n   git clone https://github.com/your-username/tinttrove.git\n   ```\n\n2. Navigate to the project directory:\n   ```bash\n   cd tinttrove\n   ```\n\n3. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. Run the application locally:\n   ```bash\n   python app.py\n   ```\n\n5. Open the application in your browser at `http://localhost:5000`.\n\n## Technologies Used\n- **Frontend**: HTML, Tailwind CSS, GSAP\n- **Backend**: Python, Flask\n- **Algorithm**: KMeans clustering for color extraction\n- **Image Processing**: OpenCV\n- **Deployment**: Heroku\n\n## Contributing\nContributions are welcome! Please fork this repository and submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirbeek%2Ftinttrove","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famirbeek%2Ftinttrove","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famirbeek%2Ftinttrove/lists"}