Custom UIColors Swift Back in Swift 2, or even earlier, UIColors were class functions, called via , , etc. UIColor.blackColor() UIColor.redColor() Naturally, creating a custom colour would look something like extension UIColor { class func facebookBlue() -> UIColor { return UIColor(red: 59/255, green: 89/255, blue: 152/255, alpha: 1) } and would be called via . UIColor.facebookBlue() In Swift 3, default were modified to be class properties, called via (or, if the type is already determined, simply ) UIColors UIColor.blue .blue I’ve noticed a lot of people (myself included) are still creating custom the pre-Swift 3 way. But I ask, why would you, when you can write them like so: UIColors extension UIColor { class var facebookBlue: UIColor { return UIColor(red: 59/255, green: 89/255, blue: 152/255, alpha: 1) } called via or where appropriate. UIColor.facebookBlue .facebookBlue So much better right? : the keyword means that the method/property is called upon the class, not an object of the class. This is very similar to , which may sound more familiar if you’ve used C++ or Java before. For the more curious class static is in fact also available in Swift and can be used in place of , so I was interested to determine the differences. If you use , the method/property can be overridden in a subclass, while cannot. static class class static This is a pretty minute detail in this case of creating custom , but a little more knowledge never hurt! UIColors While we’re inside a extension… Here’s a I like to use to simplify custom For people who are still reading: UIColor convenience init UIColor initialization convenience init(r: CGFloat, g: CGFloat, b: CGFloat, a: CGFloat {return UIColor(red: r/255, green: g/255, blue: b/255, alpha: a)} //called via class var facebookBlue: UIColor {return UIColor(r: 59, g: 89, b: 152, a: 1)} Hoped you enjoyed!