{"id":21376527,"url":"https://github.com/fluidgroup/swift-macro-hex-color","last_synced_at":"2025-07-13T10:31:08.943Z","repository":{"id":197817851,"uuid":"699414576","full_name":"FluidGroup/swift-macro-hex-color","owner":"FluidGroup","description":"A macro that expands a hexadecimal string into a floating-point color value.","archived":false,"fork":false,"pushed_at":"2025-06-13T20:22:47.000Z","size":19,"stargazers_count":20,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-13T21:27:32.849Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FluidGroup.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,"zenodo":null}},"created_at":"2023-10-02T15:30:20.000Z","updated_at":"2025-06-13T20:22:28.000Z","dependencies_parsed_at":"2025-06-13T21:33:45.256Z","dependency_job_id":null,"html_url":"https://github.com/FluidGroup/swift-macro-hex-color","commit_stats":null,"previous_names":["muukii/swift-macro-hex-color","fluidgroup/swift-macro-hex-color"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/FluidGroup/swift-macro-hex-color","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswift-macro-hex-color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswift-macro-hex-color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswift-macro-hex-color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswift-macro-hex-color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluidGroup","download_url":"https://codeload.github.com/FluidGroup/swift-macro-hex-color/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswift-macro-hex-color/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265128209,"owners_count":23715621,"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-11-22T09:16:11.212Z","updated_at":"2025-07-13T10:31:08.725Z","avatar_url":"https://github.com/FluidGroup.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swift Macro Hex Color\n\nA macro that expands a hexadecimal string into a floating-point color value.\n\n## Requirements\n\nSwift 5.9\n\n## SwiftUI\n\n```swift\n#hexColor(\"#BA43F1\")\n\n// Color(.sRGB, red: 0.7294117647058823, green: 0.2627450980392157, blue: 0.9450980392156862, opacity: 1)\n```\n\n```swift\n#hexColor(\"#BA43F1\", colorSpace: .displayP3)\n\n// Color(.displayP3, red: 0.7294117647058823, green: 0.2627450980392157, blue: 0.9450980392156862, opacity: 1)\n```\n\n```swift\n#hexColor(\"#BA43F1\", opacity: 1, colorSpace: .displayP3)\n\n// Color(.displayP3, red: 0.7294117647058823, green: 0.2627450980392157, blue: 0.9450980392156862, opacity: 1)\n```\n\n## UIKit\n\n```swift\n#hexUIColorSRGB(\"#556421\")\n// UIColor(red: 0.3333333333333333, green: 0.39215686274509803, blue: 0.12941176470588237, alpha: 1)\n\n#hexUIColorSRGB(\"#556421\", opacity: 1)\n\n#hexUIColorP3(\"#556421\")\n// UIColor(displayP3Red: 0.3333333333333333, green: 0.39215686274509803, blue: 0.12941176470588237, alpha: 1)\n\n#hexUIColorP3(\"#556421\", opacity: 1)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fswift-macro-hex-color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluidgroup%2Fswift-macro-hex-color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fswift-macro-hex-color/lists"}