Sweetercolor
Swift 的颜色扩展库。
它具有类似 Photoshop 风格的颜色混合功能!
示例
// Example of hex initializer
let sun = UIColor(hex: "#FBF002")
// Example of RGB 0-255 initializer
let pink = UIColor(r: 241, g: 139, b: 185)
let container = UIView(frame: CGRect(x: 0, y: 0, width: 888, height: 250))
container.backgroundColor = pink
let label = UILabel(frame: container.frame)
label.text = "Sweet"
label.textColor = sun
// Example of overlay similar to Photoshop with reduced alpha
// This allows us to get a more natural ambient shadow
label.layer.shadowColor = pink.overlayBlack.with(alpha: 0.6).cgColor
文档
每个方法都使用 headerdocs 进行了文档记录。概述可在此处找到:[jathu.me/sweetercolor/](http://jathu.me/sweetercolor/)
许可证
许可证在项目文件夹中提供。[license](https://github.com/jathu/sweetercolor/blob/master/LICENSE)
标志
标志和名称灵感来源于 [Sweeterman by Ramriddlz](https://soundcloud.com/ramriddlz/sweeter-man)。原始标志基于 Chiquita 标志。
2015年8月 - 多伦多