{"id":21376523,"url":"https://github.com/fluidgroup/swiftui-color","last_synced_at":"2025-10-28T20:12:08.243Z","repository":{"id":42433048,"uuid":"503460111","full_name":"FluidGroup/swiftui-color","owner":"FluidGroup","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-08T14:46:56.000Z","size":8,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-03-27T12:18:08.519Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/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}},"created_at":"2022-06-14T17:36:12.000Z","updated_at":"2023-06-25T02:53:54.000Z","dependencies_parsed_at":"2024-11-22T09:16:14.210Z","dependency_job_id":"84f5d142-55fd-4756-90c8-78c31bcaa300","html_url":"https://github.com/FluidGroup/swiftui-color","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-color","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-color/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-color/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluidGroup%2Fswiftui-color/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluidGroup","download_url":"https://codeload.github.com/FluidGroup/swiftui-color/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243852434,"owners_count":20358270,"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.162Z","updated_at":"2025-10-28T20:12:08.188Z","avatar_url":"https://github.com/FluidGroup.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftUI Color Hex API\n\nThis API provides extensions to SwiftUI's `Color` struct to easily create colors from hexadecimal strings or integers.\n\n## Color Initializer from Hex String\n\n```swift\npublic init(\n  _ colorSpace: Color.RGBColorSpace = .sRGB,\n  hexString: String\n)\n```\n\nThis initializer creates a `Color` instance from a hexadecimal string.\n\n### Parameters\n\n- `colorSpace`: The RGB color space to use for the color. Default value is `.sRGB`.\n- `hexString`: A string representing the color in hexadecimal format. The string can optionally include a '#' prefix.\n\n### Usage\n\n```swift\nlet color = Color(hexString: \"#FF5733\")\n```\n\n## Color Initializer from Hex Integer\n\n```swift\npublic init(\n  _ colorSpace: Color.RGBColorSpace = .sRGB,\n  hexInt: Int,\n  opacity: CGFloat = 1\n)\n```\n\nThis initializer creates a `Color` instance from a hexadecimal integer.\n\n### Parameters\n\n- `colorSpace`: The RGB color space to use for the color. Default value is `.sRGB`.\n- `hexInt`: An integer representing the color in hexadecimal format.\n- `opacity`: The opacity of the color. Default value is 1.\n\n### Usage\n\n```swift\nlet color = Color(hexInt: 0xFF5733)\n```\n\nThese extensions make it convenient to work with colors in a SwiftUI project when using hexadecimal values for color definitions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fswiftui-color","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluidgroup%2Fswiftui-color","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluidgroup%2Fswiftui-color/lists"}