{"id":17995159,"url":"https://github.com/623637646/uiimagecolorratio","last_synced_at":"2025-03-26T02:31:18.492Z","repository":{"id":56924899,"uuid":"364182311","full_name":"623637646/UIImageColorRatio","owner":"623637646","description":"A tool to calculate the color ratio of UIImage in iOS.","archived":false,"fork":false,"pushed_at":"2021-06-16T13:22:58.000Z","size":207,"stargazers_count":38,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-21T01:51:12.385Z","etag":null,"topics":["color","colors","ios","ratio","ratio-calculator","uicolor","uiimage"],"latest_commit_sha":null,"homepage":"","language":"Swift","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/623637646.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}},"created_at":"2021-05-04T08:00:29.000Z","updated_at":"2024-08-16T20:17:15.000Z","dependencies_parsed_at":"2022-08-20T22:50:24.499Z","dependency_job_id":null,"html_url":"https://github.com/623637646/UIImageColorRatio","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/623637646%2FUIImageColorRatio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/623637646%2FUIImageColorRatio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/623637646%2FUIImageColorRatio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/623637646%2FUIImageColorRatio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/623637646","download_url":"https://codeload.github.com/623637646/UIImageColorRatio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245576528,"owners_count":20638125,"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","colors","ios","ratio","ratio-calculator","uicolor","uiimage"],"created_at":"2024-10-29T20:18:05.360Z","updated_at":"2025-03-26T02:31:18.029Z","avatar_url":"https://github.com/623637646.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UIImageColorRatio\n\nA tool to calculate the color ratio of UIImage in iOS.\n\n![ezgif com-gif-maker](https://user-images.githubusercontent.com/5275802/117752368-39fa6500-b249-11eb-83ae-9e797abdea7f.gif)\n\n\n# How to use UIImageColorRatio\n\nGet the color ratio of UIImage.\n\n```swift\nlet image = ...  // your UIImage.\nlet result = image.calculateColorRatio(deviation: 10) // \"deviation\": The deviation on pixels, It's from 0 to 255. Bigger deviation means less kind of colors.\n```\n\nGet the effected image.\n\n```\nlet image = ...  // your UIImage.\nlet result = image.calculateColorRatio(deviation: 10)\nlet effectedImage = image.effectedImage(colorRatioResult: result)\n```\n\n\n# How to integrate UIImageColorRatio?\n\n**UIImageColorRatio** can be integrated by [cocoapods](https://cocoapods.org/). \n\n```\npod 'UIImageColorRatio'\n```\n\nOr use Swift Package Manager. SPM is supported from 1.2.0.\n\n# Performance\n\nYou can see the duration of the calculation from `calculateColorRatio` API's result.\n\nYou **MUST** use **Release build configuration** to see the performance. Because swfit is very slow on Debug build configuration. \n\n\u003cimg width=\"935\" alt=\"Screenshot 2021-05-11 at 11 23 19 AM\" src=\"https://user-images.githubusercontent.com/5275802/117753620-60210480-b24b-11eb-9b5b-2246ccf1f6c6.png\"\u003e\n\nRefer here: https://stackoverflow.com/q/61998649/9315497\n  \n\n# Requirements\n\n- iOS 10.0+\n- Xcode 11+\n- Swift 5.0+\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F623637646%2Fuiimagecolorratio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F623637646%2Fuiimagecolorratio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F623637646%2Fuiimagecolorratio/lists"}