{"id":15033415,"url":"https://github.com/yeahdongcn/uicolor-hex-swift","last_synced_at":"2025-05-15T10:00:26.842Z","repository":{"id":17863340,"uuid":"20793294","full_name":"yeahdongcn/UIColor-Hex-Swift","owner":"yeahdongcn","description":"Convenience methods for creating color using RGBA hex string.","archived":false,"fork":false,"pushed_at":"2023-11-22T08:30:10.000Z","size":187,"stargazers_count":1247,"open_issues_count":5,"forks_count":143,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-08T11:42:17.532Z","etag":null,"topics":[],"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/yeahdongcn.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}},"created_at":"2014-06-13T05:34:37.000Z","updated_at":"2025-03-19T02:10:57.000Z","dependencies_parsed_at":"2024-01-29T16:57:56.003Z","dependency_job_id":"39489095-edc0-45f5-90cd-d20fed23b30c","html_url":"https://github.com/yeahdongcn/UIColor-Hex-Swift","commit_stats":{"total_commits":183,"total_committers":31,"mean_commits":5.903225806451613,"dds":"0.33333333333333337","last_synced_commit":"47e08d1ec7802c6e8ea0a1bac0516b250d29de05"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2FUIColor-Hex-Swift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2FUIColor-Hex-Swift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2FUIColor-Hex-Swift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yeahdongcn%2FUIColor-Hex-Swift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yeahdongcn","download_url":"https://codeload.github.com/yeahdongcn/UIColor-Hex-Swift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254319715,"owners_count":22051072,"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":[],"created_at":"2024-09-24T20:21:09.858Z","updated_at":"2025-05-15T10:00:26.228Z","avatar_url":"https://github.com/yeahdongcn.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/yeahdongcn/UIColor-Hex-Swift/master/home-hero-swift-hero.png\"\u003e\n\u003c/p\u003e\n\nUIColor+Hex, now Swift.\n\n[![Build Status](https://travis-ci.org/yeahdongcn/UIColor-Hex-Swift.svg?branch=master)](https://travis-ci.org/yeahdongcn/UIColor-Hex-Swift) [![codecov.io](https://codecov.io/gh/yeahdongcn/UIColor-Hex-Swift/branch/master/graphs/badge.svg)](https://codecov.io/gh/yeahdongcn/UIColor-Hex-Swift/branch/master) ![](https://img.shields.io/badge/Swift-5.0-blue.svg?style=flat) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) ![](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)\n=================\nConvenience method for creating autoreleased color using RGBA hex string.\n\n```swift\n    // Solid color\n    let strokeColor = UIColor(\"#FFCC00\").cgColor\n\n    // Color with alpha\n    let fillColor = UIColor(\"#FFCC00DD\").cgColor\n\n    // Supports shorthand 3 character representation\n    let backgroundColor = UIColor(\"#FFF\")\n\n    // Supports shorthand 4 character representation (with alpha)\n    let menuTextColor = UIColor(\"#013E\")\n\n    // \"#FF0000FF\"\n    let hexString = UIColor.red.hexString()\n\n    // Convert shorthand 4 character representation (with alpha) from argb to rgba\n    if let rgba = \"#AFFF\".argb2rgba {\n        let androidBackgroundColor = UIColor(rgba)\n    }\n\n    // Convert 8 character representation (with alpha) from argb to rgba\n    if let rgba = \"#AAFFFFFF\".argb2rgba {\n        let androidFrontColor = UIColor(rgba)\n    }\n```\n## Release Notes\n\n* Upgrade to Swift 5.\n* macOS gets supported.\n\n## Installation\n\n### [Swift Package Manager](https://github.com/apple/swift-package-manager)\n\nTo add a package dependency to your Xcode project, select File \u003e Swift Packages \u003e Add Package Dependency and enter https://github.com/yeahdongcn/UIColor-Hex-Swift to the text field.\n\n### [CocoaPods](http://cocoapods.org)\n\nSimply add the following lines to your `Podfile`:\n```ruby\n# required by CocoaPods 0.36.0.rc.1 for Swift Pods\nuse_frameworks!\n\npod 'UIColor_Hex_Swift', '~\u003e 5.1.9'\n```\n\nThen import it where you use it:\n```swift\nimport UIColor_Hex_Swift\n```\n\n*(CocoaPods v0.36 or later required. See [this blog post](http://blog.cocoapods.org/Pod-Authors-Guide-to-CocoaPods-Frameworks/) for details.)*\n\n### [Carthage](http://github.com/Carthage/Carthage)\n\nSimply add the following line to your `Cartfile`:\n\n```ruby\ngithub \"yeahdongcn/UIColor-Hex-Swift\" \u003e= 5.1.9\n```\n\nThen add the HexColor.framework to your frameworks list in the Xcode project.\n\nThen import it where you use it:\n```swift\nimport HEXColor\n```\n\n---\n\nSee more in [RSBarcodes_Swift](https://github.com/yeahdongcn/RSBarcodes_Swift) and [objc version](https://github.com/yeahdongcn/RSBarcodes)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeahdongcn%2Fuicolor-hex-swift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyeahdongcn%2Fuicolor-hex-swift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyeahdongcn%2Fuicolor-hex-swift/lists"}