SwiftColors是HEX颜色处理工具,作为UIColor的扩展,使用Swift编写。
示例:
// Most simple waylet colorFromInt: UIColor = 0x3ab976// With hashlet color: UIColor = UIColor(hexString: "#ff8942")// Without hash, with alphalet secondColor: UIColor = UIColor(hexString: "ff8942", alpha: 0.5)// Short handlinglet shortColorWithHex: UIColor = UIColor(hexString: "fff")
评论