Slide 14
Slide 14 text
extension UIColor {
// Mark: Nested Types
struct Palette {
static let ceruleanBlue = UIColor(red: 0.0 / 255.0, green: 158.0 / 255.0, blue: 220.0 / 255.0, alpha: 1.0)
static let cannonPurple = UIColor(red: 147.0 / 255.0, green: 78.0 / 255.0, blue: 132.0 / 255.0, alpha: 1.0)
static let mulberryRed = UIColor(red: 197.0 / 255.0, green: 81.0 / 255.0, blue: 82.0 / 255.0, alpha: 1.0)
static let fireBushOrange = UIColor(red: 225.0 / 255.0, green: 148.0 / 255.0, blue: 51.0 / 255.0, alpha: 1.0)
static let saffronYellow = UIColor(red: 242.0 / 255.0, green: 190.0 / 255.0, blue: 46.0 / 255.0, alpha: 1.0)
static let sushiGreen = UIColor(red: 118.0 / 255.0, green: 184.0 / 255.0, blue: 59.0 / 255.0, alpha: 1.0)
static let black = UIColor(white: 44.0 / 255.0, alpha: 1.0)
static let white = UIColor.white
}
// . . .
}
UIColor Extension Etiquette
try! Swift Tokyo Laura Ragone
Note: Unless transparency is explicitly desired, specify colors using an alpha of 1.0.