Initial commit
Check out the Example app for more details.
extension ColorAsset { static let brandColor = ColorAsset(hex: "#88FF44") static let primaryColor = ColorAsset(named: "primary", bundle: .module, alpha: 1) }
struct ContentView: View { var body: some View { Text("Hello") .foreground(Color(.brandColor)) // or .foreground(.asset(.brandColor)) } }
let label = UILabel() label.textColor = .asset(.brandColor)
ColorAsset is only supported by Swift Package Manager.
To integrate ColorAsset into your Xcode project using Swift Package Manager, add it to the dependencies value of your Package.swift:
Package.swift
dependencies: [ .package(url: "https://github.com/PRNDcompany/ColorAsset", from: "1.0.0"), ]
This library is released under the MIT license. See LICENSE for details.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
ColorAsset
Why You should use ColorAsset?
Usage
Check out the Example app for more details.
initialize
In SwiftUI
In UIKit or AppKit
Requirements
Installation
ColorAsset is only supported by Swift Package Manager.
To integrate ColorAsset into your Xcode project using Swift Package Manager, add it to the dependencies value of your
Package.swift
:TODO
License
This library is released under the MIT license. See LICENSE for details.