diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2021-11-17 14:14:46 +0100 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2021-11-22 10:42:58 +0100 |
| commit | 6307ff34675868587ed9d1e89bedaf1e2f5efd19 (patch) | |
| tree | 206ef360b217705a1e86b03aa8f01d812862b299 /ios | |
| parent | 449960095a77781c99d1a889710491f7042adf3a (diff) | |
| download | mullvadvpn-6307ff34675868587ed9d1e89bedaf1e2f5efd19.tar.xz mullvadvpn-6307ff34675868587ed9d1e89bedaf1e2f5efd19.zip | |
Hard code colors
Diffstat (limited to 'ios')
9 files changed, 7 insertions, 160 deletions
diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Contents.json deleted file mode 100644 index 73c00596a7..0000000000 --- a/ios/MullvadVPN/Assets.xcassets/Palette/Contents.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Danger.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Danger.colorset/Contents.json deleted file mode 100644 index 5fcc3ce628..0000000000 --- a/ios/MullvadVPN/Assets.xcassets/Palette/Danger.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - }, - "colors" : [ - { - "idiom" : "universal", - "color" : { - "color-space" : "srgb", - "components" : { - "red" : "227", - "alpha" : "1.000", - "blue" : "57", - "green" : "64" - } - } - } - ] -}
\ No newline at end of file diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Primary.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Primary.colorset/Contents.json deleted file mode 100644 index 2533ad0ffd..0000000000 --- a/ios/MullvadVPN/Assets.xcassets/Palette/Primary.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - }, - "colors" : [ - { - "idiom" : "universal", - "color" : { - "color-space" : "srgb", - "components" : { - "red" : "41", - "alpha" : "1.000", - "blue" : "115", - "green" : "77" - } - } - } - ] -}
\ No newline at end of file diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Secondary.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Secondary.colorset/Contents.json deleted file mode 100644 index 27f9ef24d4..0000000000 --- a/ios/MullvadVPN/Assets.xcassets/Palette/Secondary.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - }, - "colors" : [ - { - "idiom" : "universal", - "color" : { - "color-space" : "srgb", - "components" : { - "red" : "25", - "alpha" : "1.000", - "blue" : "69", - "green" : "46" - } - } - } - ] -}
\ No newline at end of file diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/SubCell.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/SubCell.colorset/Contents.json deleted file mode 100644 index efc24fc618..0000000000 --- a/ios/MullvadVPN/Assets.xcassets/Palette/SubCell.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - }, - "colors" : [ - { - "idiom" : "universal", - "color" : { - "color-space" : "srgb", - "components" : { - "red" : "38", - "alpha" : "1.000", - "blue" : "84", - "green" : "59" - } - } - } - ] -}
\ No newline at end of file diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/SubSubCell.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/SubSubCell.colorset/Contents.json deleted file mode 100644 index f536c14f4f..0000000000 --- a/ios/MullvadVPN/Assets.xcassets/Palette/SubSubCell.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - }, - "colors" : [ - { - "idiom" : "universal", - "color" : { - "color-space" : "srgb", - "components" : { - "red" : "33", - "alpha" : "1.000", - "blue" : "77", - "green" : "51" - } - } - } - ] -}
\ No newline at end of file diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Success.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Success.colorset/Contents.json deleted file mode 100644 index 48c2ae1230..0000000000 --- a/ios/MullvadVPN/Assets.xcassets/Palette/Success.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "info" : { - "version" : 1, - "author" : "xcode" - }, - "colors" : [ - { - "idiom" : "universal", - "color" : { - "color-space" : "srgb", - "components" : { - "red" : "68", - "alpha" : "1.000", - "blue" : "77", - "green" : "173" - } - } - } - ] -}
\ No newline at end of file diff --git a/ios/MullvadVPN/Assets.xcassets/Palette/Warning.colorset/Contents.json b/ios/MullvadVPN/Assets.xcassets/Palette/Warning.colorset/Contents.json deleted file mode 100644 index b47d81baa2..0000000000 --- a/ios/MullvadVPN/Assets.xcassets/Palette/Warning.colorset/Contents.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "colors" : [ - { - "color" : { - "color-space" : "srgb", - "components" : { - "alpha" : "1.000", - "blue" : "0.141", - "green" : "0.835", - "red" : "1.000" - } - }, - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/ios/MullvadVPN/UIColor+Palette.swift b/ios/MullvadVPN/UIColor+Palette.swift index a8901d5607..60d1fe6c23 100644 --- a/ios/MullvadVPN/UIColor+Palette.swift +++ b/ios/MullvadVPN/UIColor+Palette.swift @@ -80,11 +80,11 @@ extension UIColor { } enum SubCell { - static let backgroundColor = namedColor("SubCell") + static let backgroundColor = UIColor(red: 0.15, green: 0.23, blue: 0.33, alpha: 1.0) } enum SubSubCell { - static let backgroundColor = namedColor("SubSubCell") + static let backgroundColor = UIColor(red: 0.13, green: 0.20, blue: 0.30, alpha: 1.0) } enum HeaderBar { @@ -103,16 +103,9 @@ extension UIColor { } // Common colors - static let primaryColor = namedColor("Primary") - static let secondaryColor = namedColor("Secondary") - static let dangerColor = namedColor("Danger") - static let warningColor = namedColor("Warning") - static let successColor = namedColor("Success") -} - -/// This is a helper function to access named colors from the main bundle and circumvent storyboard -/// crash. -/// See: https://openradar.appspot.com/47113341 -private func namedColor(_ name: StringLiteralType) -> UIColor { - UIColor(named: name, in: Bundle(for: AppDelegate.self), compatibleWith: nil)! + static let primaryColor = UIColor(red: 0.16, green: 0.30, blue: 0.45, alpha: 1.0) + static let secondaryColor = UIColor(red: 0.10, green: 0.18, blue: 0.27, alpha: 1.0) + static let dangerColor = UIColor(red: 0.89, green: 0.25, blue: 0.22, alpha: 1.0) + static let warningColor = UIColor(red: 1.0, green: 0.84, blue: 0.14, alpha: 1.0) + static let successColor = UIColor(red: 0.27, green: 0.68, blue: 0.30, alpha: 1.0) } |
