UIColor 扩展 SwiftColors
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/thii/SwiftColors
软件介绍
SwiftColors 是 HEX 颜色处理工具,作为 UIColor 的扩展,使用 Swift 编写。
示例:
// Most simple way let colorFromInt: UIColor = 0x3ab976 // With hash let color: UIColor = UIColor(hexString: "#ff8942") // Without hash, with alpha let secondColor: UIColor = UIColor(hexString: "ff8942", alpha: 0.5) // Short handling let shortColorWithHex: UIColor = UIColor(hexString: "fff")
