This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension UIColor { | |
convenience init(red: Int, green: Int, blue: Int) { | |
let newRed = CGFloat(red)/255 | |
let newGreen = CGFloat(green)/255 | |
let newBlue = CGFloat(blue)/255 | |
self.init(red: newRed, green: newGreen, blue: newBlue, alpha: 1.0) | |
} | |
var complement: UIColor { | |
return self.withHueOffset(0.5) |