Created
February 15, 2018 21:28
-
-
Save acrookston/7d6ab375005b9cfc9bbba858f0f38546 to your computer and use it in GitHub Desktop.
UIColor Extensions
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 { | |
static func rgba(_ r: CGFloat, _ g: CGFloat, _ b: CGFloat, _ a: CGFloat) -> UIColor { | |
return UIColor(red: r / 255.0, green: g / 255.0, blue: b / 255.0, alpha: a) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment