Skip to content

Instantly share code, notes, and snippets.

@bdalziel
Created June 7, 2016 16:59
Show Gist options
  • Select an option

  • Save bdalziel/6212a2885620dbd314bdb427b0b51c0d to your computer and use it in GitHub Desktop.

Select an option

Save bdalziel/6212a2885620dbd314bdb427b0b51c0d to your computer and use it in GitHub Desktop.
enum AppColors: String {
case Beige = "#f5efe0",
Gold = "#cda582",
FMLRed = "#fa463c",
BlackVelvet = "#1e0a14",
DarkVelvet = "#321e28",
Velvet = "#4a283e", //503146",
// Alternate colors - use sparingly
FMLRedAlt = "#e14137",
GoldAlt = "#e1b996"
}
class func color(appColor: AppColors) -> UIColor {
return UIColor(hexString: appColor.rawValue)!
}
class func colorWithAlpha(appColor: AppColors, alpha: Float) -> UIColor {
return UIColor(hexString: appColor.rawValue, alpha: alpha)!
}
@bdalziel
Copy link
Author

bdalziel commented Jun 7, 2016

Note, the exact hex value for "Velvet" changed recently. It was as simple as updating the value in this enum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment