{"id":15561330,"url":"https://github.com/heymage/color2uicolor","last_synced_at":"2026-02-12T05:18:07.904Z","repository":{"id":56906299,"uuid":"155116818","full_name":"heymage/Color2UiColor","owner":"heymage","description":"Convert hex and rgb values to UIColor objects simple.","archived":false,"fork":false,"pushed_at":"2020-05-12T21:17:43.000Z","size":207,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T22:42:17.260Z","etag":null,"topics":["cocoapods","color","hex","ios","pod","rgb","swift","swift4","uicolor","uicolor-hex","uicolor-rgb","xcode"],"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/heymage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-10-28T21:20:42.000Z","updated_at":"2020-05-12T21:17:46.000Z","dependencies_parsed_at":"2022-08-20T19:20:14.361Z","dependency_job_id":null,"html_url":"https://github.com/heymage/Color2UiColor","commit_stats":null,"previous_names":["mrcgrhrdt/color2uicolor"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heymage%2FColor2UiColor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heymage%2FColor2UiColor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heymage%2FColor2UiColor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heymage%2FColor2UiColor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heymage","download_url":"https://codeload.github.com/heymage/Color2UiColor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246140569,"owners_count":20729797,"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":["cocoapods","color","hex","ios","pod","rgb","swift","swift4","uicolor","uicolor-hex","uicolor-rgb","xcode"],"created_at":"2024-10-02T16:07:27.442Z","updated_at":"2026-02-12T05:18:07.869Z","avatar_url":"https://github.com/heymage.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Color2UiColor\n\n[![Version](https://img.shields.io/cocoapods/v/Color2UiColor.svg?style=flat-square)](https://cocoapods.org/pods/Color2UiColor)\n[![License](https://img.shields.io/cocoapods/l/Color2UiColor.svg?style=flat-square)](https://cocoapods.org/pods/Color2UiColor)\n[![Platform](https://img.shields.io/cocoapods/p/Color2UiColor.svg?style=flat-square)](https://cocoapods.org/pods/Color2UiColor)\n\nColor2UiColor is a small and simple library for Swift to quickly convert color values, HEX and RGB, to Swift’s UIColor class. The reason for this library is the inconvenience of using UIColor in converting these values.\n\n\nColor2UiColor is available under the MIT license. See the LICENSE file for more info.\n\nThis documentation is for Swift/iOS developers\n\niOS 8 as target version is required to use Color2UiColor\n\n\n## Installation\nColor2UiColor is available through CocoaPods. To install it, simply add the following line to your Podfile:\n```\npod 'Color2UiColor'\n```\n\nand run the following command in your terminal: \n```\npod install\n```\n\n## Syntax\nColor2UiColor is packed with two methods for you:\n```\nhexToUIColor(hex: String) -\u003e UIColor\nrgbToUIColor(r: Int, g: Int, b: Int) -\u003e UIColor\n```\n\nIf you have to set the opacity just add an alpha value at the end of the parameter list:\n```\nhexToUIColor(hex: String, alpha: CGFloat) -\u003e UIColor\nrgbToUIColor(r: Int, g: Int, b: Int, alpha: CGFloat) -\u003e UIColor\n```\n\n## Usage\nAt the top of your file, import Color2UiColor:\n```\nimport Color2UiColor\n```\n\nInitialize an object of Color2UiColor for future use:\n```\nlet c2uic = Color2UiColor()\n```\n\nYou can use it like in the following example:\n```\nbutton.tintColor = c2uic.hexToUIColor(hex: \"#1C9688\")\nbutton.tintColor = c2uic.rgbToUIColor(r: 28, g: 150, b: 136)\n```\n\nExample for method call with alpha value:\n```\nbutton.tintColor = c2uic.hexToUIColor(hex: \"#1C9688\", alpha: 0.4)\nbutton.tintColor = c2uic.rgbToUIColor(r: 28, g: 150, b: 136, alpha: 0.75)\n```\n\n## Example Project\nIn the repository is an example project with the basic usage of the library\n```\ngit clone https://github.com/mrcgrhrdt/Color2UiColor\ncd project/Example\npod install\n```\n\n## Author\nName: \t  Maurice Gerhardt\n\nGitHub: \t[@mrcgrhrdt](https://github.com/mrcgrhrdt)\n\nTwitter: \t[@mrcgrhrdt](https://twitter.com/mrcgrhrdt)\n\nLinkedIn: [Maurice Gerhardt](https://www.linkedin.com/in/maurice-gerhardt-840b39171/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheymage%2Fcolor2uicolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheymage%2Fcolor2uicolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheymage%2Fcolor2uicolor/lists"}