summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ios/MullvadVPN/UIColor+Palette.swift34
1 files changed, 23 insertions, 11 deletions
diff --git a/ios/MullvadVPN/UIColor+Palette.swift b/ios/MullvadVPN/UIColor+Palette.swift
index 72a1b4ace8..0298502fef 100644
--- a/ios/MullvadVPN/UIColor+Palette.swift
+++ b/ios/MullvadVPN/UIColor+Palette.swift
@@ -10,20 +10,20 @@ import UIKit
extension UIColor {
- struct AccountTextField {
- struct NormalState {
+ enum AccountTextField {
+ enum NormalState {
static let borderColor = UIColor(red: 0.10, green: 0.18, blue: 0.27, alpha: 1.0)
static let textColor = UIColor(red: 0.16, green: 0.30, blue: 0.45, alpha: 1.0)
static let backgroundColor = UIColor.white
}
- struct ErrorState {
+ enum ErrorState {
static let borderColor = dangerColor.withAlphaComponent(0.4)
static let textColor = dangerColor
static let backgroundColor = UIColor.white
}
- struct AuthenticatingState {
+ enum AuthenticatingState {
static let borderColor = UIColor.clear
static let textColor = UIColor.white
static let backgroundColor = UIColor.white.withAlphaComponent(0.2)
@@ -31,27 +31,39 @@ extension UIColor {
}
// Relay availability indicator view
- struct RelayStatusIndicator {
+ enum RelayStatusIndicator {
static let activeColor = successColor.withAlphaComponent(0.9)
static let inactiveColor = dangerColor.withAlphaComponent(0.95)
}
// Cells
- struct Cell {
+ enum Cell {
static let backgroundColor = UIColor(red: 0.16, green: 0.30, blue: 0.45, alpha: 1.0)
- static let selectedAltBackgroundColor = backgroundColor.darkened(by: 0.2)
+ static let disabledBackgroundColor = backgroundColor.darkened(by: 0.3)!
+
static let selectedBackgroundColor = successColor
- static let subCellBackgroundColor = UIColor(red: 0.15, green: 0.23, blue: 0.33, alpha: 1.0)
- static let subSubCellBackgroundColor = UIColor(red: 0.13, green: 0.20, blue: 0.30, alpha: 1.0)
+ static let disabledSelectedBackgroundColor = selectedBackgroundColor.darkened(by: 0.3)!
+
+ static let selectedAltBackgroundColor = backgroundColor.darkened(by: 0.2)!
+ }
+
+ enum SubCell {
+ static let backgroundColor = UIColor(red: 0.15, green: 0.23, blue: 0.33, alpha: 1.0)
+ static let disabledBackgroundColor = backgroundColor.darkened(by: 0.3)!
+ }
+
+ enum SubSubCell {
+ static let backgroundColor = UIColor(red: 0.13, green: 0.20, blue: 0.30, alpha: 1.0)
+ static let disabledBackgroundColor = backgroundColor.darkened(by: 0.3)!
}
- struct HeaderBar {
+ enum HeaderBar {
static let defaultBackgroundColor = UIColor(red: 0.16, green: 0.30, blue: 0.45, alpha: 1.0)
static let unsecuredBackgroundColor = dangerColor
static let securedBackgroundColor = successColor
}
// Common colors
- static let dangerColor = UIColor(red: 0.82, green: 0.01, blue: 0.11, alpha: 1.0)
+ static let dangerColor = UIColor(red: 0.89, green: 0.25, blue: 0.22, alpha: 1.0)
static let successColor = UIColor(red: 0.27, green: 0.68, blue: 0.30, alpha: 1.0)
}