{"id":16207713,"url":"https://github.com/mukarillo/unityprominentcolor","last_synced_at":"2025-03-19T08:30:30.537Z","repository":{"id":126316876,"uuid":"131774533","full_name":"Mukarillo/UnityProminentColor","owner":"Mukarillo","description":"Tool to gather main colors of an image using Unity.","archived":false,"fork":false,"pushed_at":"2021-10-10T15:20:22.000Z","size":348,"stargazers_count":57,"open_issues_count":0,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-02-28T16:55:39.161Z","etag":null,"topics":["image-classification","image-processing","image-recognition","unity","unity3d","unity3d-plugin"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/Mukarillo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"mukarillo","tidelift":null,"community_bridge":null,"liberapay":"mukarillo","issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-05-01T23:43:34.000Z","updated_at":"2024-12-16T16:03:54.000Z","dependencies_parsed_at":"2023-06-16T06:45:40.407Z","dependency_job_id":null,"html_url":"https://github.com/Mukarillo/UnityProminentColor","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/Mukarillo%2FUnityProminentColor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukarillo%2FUnityProminentColor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukarillo%2FUnityProminentColor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mukarillo%2FUnityProminentColor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mukarillo","download_url":"https://codeload.github.com/Mukarillo/UnityProminentColor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243976459,"owners_count":20377691,"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":["image-classification","image-processing","image-recognition","unity","unity3d","unity3d-plugin"],"created_at":"2024-10-10T10:14:15.703Z","updated_at":"2025-03-19T08:30:30.027Z","avatar_url":"https://github.com/Mukarillo.png","language":"C#","funding_links":["https://ko-fi.com/mukarillo","https://liberapay.com/mukarillo"],"categories":[],"sub_categories":[],"readme":"# Unity Prominent Color\nThis is a very simple tool to gather main colors of an image using Unity.\n\n## How to use\nYou will find a static class called ProminentColor. You can call **GetColors32FromImage** to get a `List\u003cColor32\u003e` or **GetHexColorsFromImage** to get a `List\u003cstring\u003e` (of hex colors). Both of the methods will take these parameters:\n\n|name  |type  |description  |\n|--|--|--|\n|`texture` |**Texture2D** |*Texture to get colors*  |\n|`maxColorAmount` |**int** |*The max length of the list to be returned*  |\n|`colorLimiterPercentage` |**float** |*Value used to compare color amounts. If color amount percentage is less than this value, it will not be marked as valid color*  |\n|`toleranceUniteColors` |**int** |*Value used to compare colors and unite them if is a match, useful to discard gradients*  |\n|`minimiumColorPercentage` |**float** |*Value used to remove colors that have lower amount percentage compared with full image*  |\n\n![result image](https://github.com/Mukarillo/UnityProminentColor/blob/master/result.png?raw=true)\n*simple result, without much fine tunning*\n\n## Removing the white (or any color) border\nIf your image has borders, you will probably have this color in the list. If you wish to remove this border, there is a helper in ProminentColor class called **RemoveBorder**, it returns the `Texture2D` without the border. This method take these parameters:\n\n|name  |type  |description  |\n|--|--|--|\n|`texture` |**Texture2D** |*Texture to remove the border*  |\n|`compareColor` |**Color32** |*Color to be removed*  |\n|`tolerance` |**float** |*Tolerance to compare the color to be removed*  |\n\n![removing borders](https://github.com/Mukarillo/UnityProminentColor/blob/master/remove_border.png?raw=true)\u003cbr /\u003e\n*as you can see, there are small glitches, but white is not prominent anymore.*\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmukarillo%2Funityprominentcolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmukarillo%2Funityprominentcolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmukarillo%2Funityprominentcolor/lists"}