Last active
March 23, 2017 12:54
-
-
Save sauvikatinnofied/d08c07e8c3ec2449a9614da5812ffde7 to your computer and use it in GitHub Desktop.
MediumBlog Colour schemes
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 Color { | |
var value: UIColor { | |
var instanceColor = UIColor.clear | |
switch self { | |
case .border: | |
instanceColor = UIColor(hexString: "#333333") | |
case .theme: | |
instanceColor = UIColor(hexString: "#ffcc00") | |
case .shadow: | |
instanceColor = UIColor(hexString: "#cccccc") | |
case .darkBackground: | |
instanceColor = UIColor(hexString: "#999966") | |
case .lightBackground: | |
instanceColor = UIColor(hexString: "#cccc66") | |
case .intermidiateBackground: | |
instanceColor = UIColor(hexString: "#cccc99") | |
case .darkText: | |
instanceColor = UIColor(hexString: "#333333") | |
case .intermidiateText: | |
instanceColor = UIColor(hexString: "#999999") | |
case .lightText: | |
instanceColor = UIColor(hexString: "#cccccc") | |
case .affirmation: | |
instanceColor = UIColor(hexString: "#00ff66") | |
case .negation: | |
instanceColor = UIColor(hexString: "#ff3300") | |
case .custom(let hexValue, let opacity): | |
instanceColor = UIColor(hexString: hexValue).withAlphaComponent(CGFloat(opacity)) | |
} | |
return instanceColor | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment