{"id":15170590,"url":"https://github.com/p-x9/swiftuicolor","last_synced_at":"2025-07-03T17:09:53.980Z","repository":{"id":61881479,"uuid":"555865137","full_name":"p-x9/SwiftUIColor","owner":"p-x9","description":"🎨 Make system color defined in UIColor/NSColor available to SwiftUI Color.","archived":false,"fork":false,"pushed_at":"2024-04-24T12:36:41.000Z","size":162,"stargazers_count":22,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-24T14:10:09.450Z","etag":null,"topics":["ios","macos","plugin","swift","swiftpackage","swiftui"],"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/p-x9.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-10-22T14:13:17.000Z","updated_at":"2024-04-24T12:36:04.000Z","dependencies_parsed_at":"2024-04-24T11:41:19.670Z","dependency_job_id":"0737a3e7-d07a-4bb4-9e42-24b81ca19a1f","html_url":"https://github.com/p-x9/SwiftUIColor","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2FSwiftUIColor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2FSwiftUIColor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2FSwiftUIColor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-x9%2FSwiftUIColor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-x9","download_url":"https://codeload.github.com/p-x9/SwiftUIColor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865149,"owners_count":16555931,"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":["ios","macos","plugin","swift","swiftpackage","swiftui"],"created_at":"2024-09-27T08:04:10.509Z","updated_at":"2024-10-10T22:42:14.337Z","avatar_url":"https://github.com/p-x9.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SwiftUIColor\n\nMake system color defined in `UIColor`/`NSColor` available to SwiftUI Color.\n\n## Usage\n1. import\n   ```swift\n   import SwiftUIColor\n   ```\n2. Use\n\n   Get the color for each platform\n   ```swift\n   // universal system colors\n   let color = Color.universal.systemRed\n\n   // iOS system colors\n   let color = Color.iOS.systemBackground\n\n   // macOS system colors\n   let color = Color.macOS.secondarySystemFillColor\n\n   // and watchOS, tvOS...\n   ```\n\n   Another Style\n   ```swift\n   // universal system colors\n   let color: Color = .universal(.systemRed)\n\n   // iOS system colors\n   let color: Color = .iOS(systemBackground)\n\n   // macOS system colors\n   let color: Color = macOS(.secondarySystemFillColor)\n\n   // and watchOS, tvOS...\n   ```\n\n   list of colors\n   ```swift\n   // universal color list\n   let colors: [Color] = Color.universal.colors\n\n   list of color names\n   ```swift\n   // universal color name list\n   let colors: [Color] = Color.universal.colorNames\n   ```\n\n## Example\n|  universal  |  iOS  |  macOS  |\n| ---- | ---- | ---- |\n|  ![universal](https://user-images.githubusercontent.com/50244599/213266065-c2a80ef4-4612-4684-b03a-2d5ed424358a.PNG)  |  ![iOS](https://user-images.githubusercontent.com/50244599/213266082-b09044df-5b45-408e-a1e7-84c055777f63.PNG)  |  ![macOS](https://user-images.githubusercontent.com/50244599/213266087-daf724fd-2142-4b96-b00c-cfc47a2b7a63.PNG)  |\n\n|  tvOS  |  watchOS  |\n| ---- | ---- |\n|  ![tvOS](https://user-images.githubusercontent.com/50244599/213266103-99a41ad1-4154-4ec1-99c8-aae210aceb4e.PNG)  |  ![watchOS](https://user-images.githubusercontent.com/50244599/213266108-bc9c1ce9-982f-441a-91a4-d4c03f179204.PNG) |\n\n## Development\nIn this library, colors are defined in an asset file.\n\u003cimg width=\"1379\" alt=\"image\" src=\"https://user-images.githubusercontent.com/50244599/197352199-499cec35-bc47-43ae-8fe4-9b785cab1faa.png\"\u003e\n\nBased on this asset file, the following code is generated.\n\n\u003cimg width=\"1379\" alt=\"image\" src=\"https://user-images.githubusercontent.com/50244599/197352377-13e2b057-f389-468a-9659-a7240d0b4c2c.png\"\u003e\n\nIf you have updated the asset file, use the following command to update the code\n\n```sh\nswift run -c release --package-path . prepare-swiftui-color Sources/SwiftUIColor/Assets/Media.xcassets/ Sources/SwiftUIColor/\n```\n\n## License\nSwiftUIColor is released under the MIT License. See [LICENSE](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-x9%2Fswiftuicolor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-x9%2Fswiftuicolor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-x9%2Fswiftuicolor/lists"}