The most sexy way to use colors in Swift. Both compatible with iOS and macOS.
let color = 0x123456.colorUse infix operator ~.
let transparent = 0x123456.color ~ 50%
let red = UIColor.red ~ 10%
let float = UIColor.blue ~ 0.5 // == 50%let view = UIView()
view.alpha = 30% // == 0.3SwiftyColor is under MIT license. See LICENSE file for more information.