SwiftColorsUIColor 擴(kuò)展
SwiftColors 是 HEX 顏色處理工具,作為 UIColor 的擴(kuò)展,使用 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")
評論
圖片
表情
