Skip to content

Commit

Permalink
feat(Colors): Update colors to match web and Android (#166)
Browse files Browse the repository at this point in the history
* feat(Colors): Update colors to match web and Android
  • Loading branch information
Gomay88 committed May 4, 2022
1 parent cf36948 commit 03341d3
Show file tree
Hide file tree
Showing 163 changed files with 243 additions and 218 deletions.
2 changes: 1 addition & 1 deletion Mistica.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|

s.homepage = 'https://github.com/Telefonica/mistica-ios'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Novum' => 'appscore@tuenti.com' }
s.author = { 'Novum' => 'cto-ios@telefonica.com' }
s.source = { :git => 'https://github.com/Telefonica/mistica-ios/mistica-ios.git', :tag => s.version.to_s }

s.ios.deployment_target = '12.0'
Expand Down
25 changes: 13 additions & 12 deletions Mistica/Source/Colors/BlauColorPalette.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ struct BlauColors: Colors {
let backgroundFeedbackBottom = BlauColorPalette.blauBluePrimary | BlauColorPalette.darkModeBlack
let backgroundOverlay = BlauColorPalette.blauBlueSecondary.withAlphaComponent(0.75) | BlauColorPalette.darkModeGrey.withAlphaComponent(0.8)
let backgroundSkeleton = BlauColorPalette.grey2 | BlauColorPalette.darkModeGrey
let backgroundSkeletonInverse = BlauColorPalette.white | BlauColorPalette.darkModeGrey
let backgroundSkeletonInverse = BlauColorPalette.white.withAlphaComponent(0.2) | BlauColorPalette.darkModeGrey
let navigationBarBackground = BlauColorPalette.blauBluePrimary | BlauColorPalette.darkModeBlack
let skeletonWave = BlauColorPalette.grey2 | BlauColorPalette.grey5

Expand Down Expand Up @@ -65,14 +65,15 @@ struct BlauColors: Colors {
let textButtonSecondaryInverseSelected = BlauColorPalette.white | BlauColorPalette.blauBlueSecondary60
let textButtonSecondarySelected = BlauColorPalette.blauBlueSecondary60 | BlauColorPalette.blauBlueSecondary60

let textLink = BlauColorPalette.blauPurple
let textLink = BlauColorPalette.blauPurple | BlauColorPalette.blauPurple30
let textLinkInverse = BlauColorPalette.white | BlauColorPalette.blauPurple30
let textLinkDanger = BlauColorPalette.blauRed
let textLinkDangerDisabled = BlauColorPalette.blauRed20 | BlauColorPalette.grey5
let textLinkDisabled = BlauColorPalette.blauPurple30 | BlauColorPalette.grey5
let textLinkSnackbar = BlauColorPalette.blauPurple30

// CONTROLS
let control = BlauColorPalette.grey2 | BlauColorPalette.grey5
let control = BlauColorPalette.grey2 | BlauColorPalette.darkModeGrey
let controlActivated = BlauColorPalette.blauBlueSecondary
let controlError = BlauColorPalette.blauRed
let loadingBar = BlauColorPalette.blauBlueSecondary | BlauColorPalette.blauBluePrimary
Expand Down Expand Up @@ -127,12 +128,12 @@ struct BlauColors: Colors {
]

// TAGS
var tagBackgroundSuccess = BlauColorPalette.blauGreen10 | BlauColorPalette.darkModeGrey
var tagBackgroundWarning = BlauColorPalette.blauYellow10 | BlauColorPalette.darkModeGrey
var tagBackgroundError = BlauColorPalette.blauRed10 | BlauColorPalette.darkModeGrey
var tagBackgroundPromo = BlauColorPalette.blauPurple10 | BlauColorPalette.darkModeGrey
var tagBackgroundActive = BlauColorPalette.blauBlueSecondary10 | BlauColorPalette.darkModeGrey
var tagBackgroundInactive = BlauColorPalette.grey2 | BlauColorPalette.darkModeGrey
var tagBackgroundSuccess = BlauColorPalette.blauGreen10 | BlauColorPalette.white.withAlphaComponent(0.05)
var tagBackgroundWarning = BlauColorPalette.blauYellow10 | BlauColorPalette.white.withAlphaComponent(0.05)
var tagBackgroundError = BlauColorPalette.blauRed10 | BlauColorPalette.white.withAlphaComponent(0.05)
var tagBackgroundPromo = BlauColorPalette.blauPurple10 | BlauColorPalette.white.withAlphaComponent(0.05)
var tagBackgroundActive = BlauColorPalette.blauBlueSecondary10 | BlauColorPalette.white.withAlphaComponent(0.05)
var tagBackgroundInactive = BlauColorPalette.grey2 | BlauColorPalette.white.withAlphaComponent(0.05)
var textTagSuccess = BlauColorPalette.blauGreen70 | BlauColorPalette.blauGreen30
var textTagWarning = BlauColorPalette.blauYellow70 | BlauColorPalette.blauYellow40
var textTagError = BlauColorPalette.blauRed70 | BlauColorPalette.blauRed40
Expand Down Expand Up @@ -161,15 +162,15 @@ public enum BlauColorPalette {
public static let blauYellow60 = UIColor(hex: "#F09500")!
public static let blauYellow70 = UIColor(hex: "#996614")!
public static let blauGreen = UIColor(hex: "#30D300")!
public static let blauGreen10 = UIColor(hex: "#EAFBE5")!
public static let blauGreen30 = UIColor(hex: "#97E980")!
public static let blauGreen70 = UIColor(hex: "#1D7F00")!
public static let blauRed = UIColor(hex: "#F64417")!
public static let blauRed10 = UIColor(hex: "#FEECE8")!
public static let blauRed20 = UIColor(hex: "#FCC7B9")!
public static let blauRed30 = UIColor(hex: "#FA9E87")!
public static let blauRed40 = UIColor(hex: "#F97C5D")!
public static let blauRed70 = UIColor(hex: "#C93712")!
public static let blauGreen10 = UIColor(hex: "#EAFBE5")!
public static let blauGreen30 = UIColor(hex: "#97E980")!
public static let blauGreen70 = UIColor(hex: "#1D7F00")!

public static let grey1 = UIColor(hex: "#F5F9FA")!
public static let grey2 = UIColor(hex: "#E7E7E7")!
Expand Down
5 changes: 5 additions & 0 deletions Mistica/Source/Colors/ColorToolkit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ public extension UIColor {
MisticaConfig.currentColors.textLink
}

@objc(textLinkInverseColor)
static var textLinkInverse: UIColor {
MisticaConfig.currentColors.textLinkInverse
}

@objc(textLinkDangerColor)
static var textLinkDanger: UIColor {
MisticaConfig.currentColors.textLinkDanger
Expand Down
1 change: 1 addition & 0 deletions Mistica/Source/Colors/Colors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ protocol Colors {
var textButtonSecondaryInverseDisabled: UIColor { get }
var textButtonSecondaryInverseSelected: UIColor { get }
var textLink: UIColor { get }
var textLinkInverse: UIColor { get }
var textLinkDanger: UIColor { get }
var textLinkDangerDisabled: UIColor { get }
var textLinkDisabled: UIColor { get }
Expand Down
Loading

0 comments on commit 03341d3

Please sign in to comment.