Last active
August 29, 2015 14:18
-
-
Save freesia/75f3f858cdd87af17bf1 to your computer and use it in GitHub Desktop.
UIColor extension
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
import UIKit | |
extension UIColor | |
{ | |
class func colorFromRGB( #r: Int, g: Int, b: Int ) -> UIColor | |
{ | |
return UIColor( red: CGFloat(r) / 255.0, green: CGFloat(g) / 255.0, blue: CGFloat(b) / 255.0, alpha: CGFloat(1.0) ) | |
} | |
class func brandColor() -> UIColor | |
{ | |
return colorFromRGB( r: 115, g: 133, b: 134 ) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment