diff --git a/Sources/MisticaCommon/Colors/BlauColorPalette.swift b/Sources/MisticaCommon/Colors/BlauColorPalette.swift index 37056419..44b5358a 100644 --- a/Sources/MisticaCommon/Colors/BlauColorPalette.swift +++ b/Sources/MisticaCommon/Colors/BlauColorPalette.swift @@ -10,264 +10,145 @@ import UIKit struct BlauColors: MisticaColors { static let palette = BlauColorPalette() - let backgroundBrand = MisticaColor.solid(BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack) - let backgroundBrandSecondary = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack - let appBarBackground = BlauColors.palette.white | BlauColors.palette.darkModeGrey - let background = BlauColors.palette.white | BlauColors.palette.darkModeBlack - let backgroundContainer = BlauColors.palette.white | BlauColors.palette.darkModeGrey - let backgroundContainerError = BlauColors.palette.blauRed10 | BlauColors.palette.darkModeGrey - let backgroundContainerHover = BlauColors.palette.blauBluePrimary.withAlphaComponent(0.03) | BlauColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerPressed = BlauColors.palette.blauBluePrimary.withAlphaComponent(0.05) | BlauColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = MisticaColor.solid(BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeGrey) - let backgroundContainerBrandHover = BlauColors.palette.darkModeBlack.withAlphaComponent(0.2) | BlauColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerBrandPressed = BlauColors.palette.darkModeBlack.withAlphaComponent(0.4) | BlauColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrandOverInverse = BlauColors.palette.blauBlueSecondary | BlauColors.palette.darkModeGrey - let backgroundContainerAlternative = BlauColors.palette.blauBluePrimary20 | BlauColors.palette.darkModeGrey - let backgroundOverlay = BlauColors.palette.blauBlueSecondary.withAlphaComponent(0.75) | BlauColors.palette.darkModeGrey.withAlphaComponent(0.8) - let backgroundSkeleton = BlauColors.palette.grey2 | BlauColors.palette.darkModeGrey - let backgroundSkeletonInverse = BlauColors.palette.blauBlueSecondary | BlauColors.palette.darkModeGrey - let navigationBarBackground = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack - let backgroundAlternative = BlauColors.palette.blauBluePrimary20 | BlauColors.palette.darkModeBlack - let backgroundBrandTop = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack - let backgroundBrandBottom = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack - let skeletonWave = BlauColors.palette.grey2 | BlauColors.palette.grey5 - let borderLow = BlauColors.palette.grey1 | BlauColors.palette.darkModeBlack - let border = BlauColors.palette.grey2 | BlauColors.palette.darkModeGrey - - let borderHigh = BlauColors.palette.grey5 - - let borderSelected = BlauColors.palette.blauBlueSecondary60 - - let coverBackgroundHover = BlauColors.palette.darkModeBlack.withAlphaComponent(0.25) - - let coverBackgroundPressed = BlauColors.palette.darkModeBlack.withAlphaComponent(0.35) - - let buttonDangerBackground = BlauColors.palette.blauRed - - let buttonDangerBackgroundSelected = BlauColors.palette.blauRed70 - - let buttonDangerBackgroundHover = BlauColors.palette.blauRed70 - + let borderHigh = BlauColors.palette.grey5 | BlauColors.palette.grey5 + let borderSelected = BlauColors.palette.blauBlueSecondary60 | BlauColors.palette.blauBlueSecondary60 + let coverBackgroundHover = BlauColors.palette.darkModeBlack.withAlphaComponent(0.25) | BlauColors.palette.darkModeBlack.withAlphaComponent(0.25) + let coverBackgroundPressed = BlauColors.palette.darkModeBlack.withAlphaComponent(0.35) | BlauColors.palette.darkModeBlack.withAlphaComponent(0.35) + let buttonDangerBackground = BlauColors.palette.blauRed | BlauColors.palette.blauRed + let buttonDangerBackgroundSelected = BlauColors.palette.blauRed70 | BlauColors.palette.blauRed70 + let buttonDangerBackgroundHover = BlauColors.palette.blauRed70 | BlauColors.palette.blauRed70 let buttonLinkDangerBackgroundSelected = BlauColors.palette.blauRed10 | BlauColors.palette.blauPurple.withAlphaComponent(0.3) - let buttonLinkDangerBackgroundInverse = BlauColors.palette.white | BlauColors.palette.white.withAlphaComponent(0) - let buttonLinkDangerBackgroundInverseSelected = BlauColors.palette.blauRed10 | BlauColors.palette.blauPurple.withAlphaComponent(0.3) - let buttonLinkBackgroundSelected = BlauColors.palette.blauPurple10 | BlauColors.palette.blauPurple.withAlphaComponent(0.3) - let buttonLinkBackgroundInverseSelected = BlauColors.palette.white.withAlphaComponent(0.15) | BlauColors.palette.blauPurple.withAlphaComponent(0.3) - - let buttonPrimaryBackground = BlauColors.palette.blauBlueSecondary - + let buttonPrimaryBackground = BlauColors.palette.blauBlueSecondary | BlauColors.palette.blauBlueSecondary let buttonPrimaryBackgroundInverse = BlauColors.palette.white | BlauColors.palette.blauBluePrimary - - let buttonPrimaryBackgroundSelected = BlauColors.palette.blauBlueSecondary60 - - let buttonPrimaryBackgroundHover = BlauColors.palette.blauBlueSecondary60 - + let buttonPrimaryBackgroundSelected = BlauColors.palette.blauBlueSecondary60 | BlauColors.palette.blauBlueSecondary60 + let buttonPrimaryBackgroundHover = BlauColors.palette.blauBlueSecondary60 | BlauColors.palette.blauBlueSecondary60 let buttonPrimaryBackgroundInverseSelected = BlauColors.palette.blauBluePrimary30 | BlauColors.palette.blauBlueSecondary60 - let buttonSecondaryBorder = BlauColors.palette.blauBlueSecondary | BlauColors.palette.white - let buttonSecondaryBorderSelected = BlauColors.palette.blauBlueSecondary60 | BlauColors.palette.white - - let buttonSecondaryBorderInverse = BlauColors.palette.white - + let buttonSecondaryBorderInverse = BlauColors.palette.white | BlauColors.palette.white let buttonSecondaryBackgroundHover = BlauColors.palette.blauBlueSecondary10 | BlauColors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundSelected = BlauColors.palette.blauBlueSecondary10 | BlauColors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBorderInverseSelected = BlauColors.palette.white - + let buttonSecondaryBorderInverseSelected = BlauColors.palette.white | BlauColors.palette.white let buttonSecondaryBackgroundInverseHover = BlauColors.palette.white.withAlphaComponent(0.2) | BlauColors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundInverseSelected = BlauColors.palette.white.withAlphaComponent(0.2) | BlauColors.palette.white.withAlphaComponent(0.15) - let textButtonPrimary = BlauColors.palette.white | BlauColors.palette.grey2 - let textButtonPrimaryInverse = BlauColors.palette.blauBlueSecondary | BlauColors.palette.grey2 - let textButtonPrimaryInverseSelected = BlauColors.palette.blauBlueSecondary60 | BlauColors.palette.grey2 - let textButtonSecondary = BlauColors.palette.blauBlueSecondary | BlauColors.palette.grey2 - let textButtonSecondarySelected = BlauColors.palette.blauBlueSecondary60 | BlauColors.palette.grey2 - let textButtonSecondaryInverse = BlauColors.palette.white | BlauColors.palette.grey2 - let textButtonSecondaryInverseSelected = BlauColors.palette.white | BlauColors.palette.grey2 - let textLink = BlauColors.palette.blauPurple | BlauColors.palette.blauPurple30 - let textLinkInverse = BlauColors.palette.white | BlauColors.palette.blauPurple30 - - let textLinkDanger = BlauColors.palette.blauRed - - let textLinkSnackbar = BlauColors.palette.blauPurple30 - - let textActivated = BlauColors.palette.blauBlueSecondary - - let textBrand = BlauColors.palette.blauBluePrimary - + let textLinkDanger = BlauColors.palette.blauRed | BlauColors.palette.blauRed + let textLinkSnackbar = BlauColors.palette.blauPurple30 | BlauColors.palette.blauPurple30 + let textActivated = BlauColors.palette.blauBlueSecondary | BlauColors.palette.blauBlueSecondary + let textBrand = BlauColors.palette.blauBluePrimary | BlauColors.palette.blauBluePrimary let control = BlauColors.palette.grey2 | BlauColors.palette.darkModeGrey6 - - let controlActivated = BlauColors.palette.blauBlueSecondary - + let controlActivated = BlauColors.palette.blauBlueSecondary | BlauColors.palette.blauBlueSecondary let controlInverse = BlauColors.palette.blauBluePrimary30 | BlauColors.palette.darkModeGrey6 - let controlActivatedInverse = BlauColors.palette.white | BlauColors.palette.blauBlueSecondary - - let controlError = BlauColors.palette.blauRed - + let controlError = BlauColors.palette.blauRed | BlauColors.palette.blauRed let barTrack = BlauColors.palette.grey2 | BlauColors.palette.darkModeGrey6 - let loadingBar = BlauColors.palette.blauBlueSecondary | BlauColors.palette.blauBluePrimary - let loadingBarBackground = BlauColors.palette.blauBlueSecondary10 | BlauColors.palette.darkModeGrey - let toggleAndroidInactive = BlauColors.palette.grey2 | BlauColors.palette.grey5 - let toggleAndroidBackgroundActive = BlauColors.palette.blauBlueSecondary10 | BlauColors.palette.blauBlueSecondary30 - let iosControlKnob = BlauColors.palette.white | BlauColors.palette.grey2 - let divider = BlauColors.palette.grey2 | BlauColors.palette.white.withAlphaComponent(0.05) - let dividerInverse = BlauColors.palette.white.withAlphaComponent(0.2) | BlauColors.palette.white.withAlphaComponent(0.05) - let navigationBarDivider = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack - - let badge = BlauColors.palette.blauRed - - let feedbackErrorBackground = BlauColors.palette.blauRed - + let badge = BlauColors.palette.blauRed | BlauColors.palette.blauRed + let feedbackErrorBackground = BlauColors.palette.blauRed | BlauColors.palette.blauRed let feedbackInfoBackground = BlauColors.palette.grey6 | BlauColors.palette.darkModeGrey - - let brand = BlauColors.palette.blauBluePrimary - + let brand = BlauColors.palette.blauBluePrimary | BlauColors.palette.blauBluePrimary let brandHigh = BlauColors.palette.blauBlueSecondary | BlauColors.palette.white.withAlphaComponent(0.05) - let inverse = BlauColors.palette.white | BlauColors.palette.grey2 - let neutralHigh = BlauColors.palette.grey6 | BlauColors.palette.grey2 - - let neutralMedium = BlauColors.palette.grey5 - - let neutralMediumInverse = BlauColors.palette.grey5 - + let neutralMedium = BlauColors.palette.grey5 | BlauColors.palette.grey5 + let neutralMediumInverse = BlauColors.palette.grey5 | BlauColors.palette.grey5 let neutralLow = BlauColors.palette.grey1 | BlauColors.palette.darkModeGrey6 - let neutralLowAlternative = BlauColors.palette.grey2 | BlauColors.palette.darkModeGrey6 - let textPrimary = BlauColors.palette.grey6 | BlauColors.palette.grey2 - let textPrimaryInverse = BlauColors.palette.white | BlauColors.palette.grey2 - let textSecondary = BlauColors.palette.grey5 | BlauColors.palette.grey4 - let textSecondaryInverse = BlauColors.palette.blauBluePrimary20 | BlauColors.palette.grey4 - - let error = BlauColors.palette.blauRed - - let textError = BlauColors.palette.blauRed - + let error = BlauColors.palette.blauRed | BlauColors.palette.blauRed + let textError = BlauColors.palette.blauRed | BlauColors.palette.blauRed let textErrorInverse = BlauColors.palette.white | BlauColors.palette.blauRed - - let success = BlauColors.palette.blauGreen - - let warning = BlauColors.palette.blauYellow - - let promo = BlauColors.palette.blauPurple - - let highlight = BlauColors.palette.blauBluePrimary - + let success = BlauColors.palette.blauGreen | BlauColors.palette.blauGreen + let warning = BlauColors.palette.blauYellow | BlauColors.palette.blauYellow + let promo = BlauColors.palette.blauPurple | BlauColors.palette.blauPurple + let highlight = BlauColors.palette.blauBluePrimary | BlauColors.palette.blauBluePrimary let successLow = BlauColors.palette.blauGreen10 | BlauColors.palette.darkModeGrey6 - let warningLow = BlauColors.palette.blauYellow10 | BlauColors.palette.darkModeGrey6 - let errorLow = BlauColors.palette.blauRed10 | BlauColors.palette.darkModeGrey6 - let promoLow = BlauColors.palette.blauPurple10 | BlauColors.palette.darkModeGrey6 - let brandLow = BlauColors.palette.blauBlueSecondary10 | BlauColors.palette.darkModeGrey6 - let successHigh = BlauColors.palette.blauGreen70 | BlauColors.palette.blauGreen30 - let warningHigh = BlauColors.palette.blauYellow70 | BlauColors.palette.blauYellow40 - let errorHigh = BlauColors.palette.blauRed70 | BlauColors.palette.blauRed40 - let promoHigh = BlauColors.palette.blauPurple | BlauColors.palette.blauPurple30 - - let successHighInverse = BlauColors.palette.blauGreen70 - - let warningHighInverse = BlauColors.palette.blauYellow70 - - let errorHighInverse = BlauColors.palette.blauRed70 - - let promoHighInverse = BlauColors.palette.blauPurple - + let successHighInverse = BlauColors.palette.blauGreen70 | BlauColors.palette.blauGreen70 + let warningHighInverse = BlauColors.palette.blauYellow70 | BlauColors.palette.blauYellow70 + let errorHighInverse = BlauColors.palette.blauRed70 | BlauColors.palette.blauRed70 + let promoHighInverse = BlauColors.palette.blauPurple | BlauColors.palette.blauPurple let textNavigationBarPrimary = BlauColors.palette.white | BlauColors.palette.grey2 - let textNavigationBarSecondary = BlauColors.palette.blauBlueSecondary20 | BlauColors.palette.grey4 - let textNavigationSearchBarHint = BlauColors.palette.blauBlueSecondary20 | BlauColors.palette.grey4 - let textNavigationSearchBarText = BlauColors.palette.white | BlauColors.palette.grey2 - - let textAppBar = BlauColors.palette.grey5 - + let textAppBar = BlauColors.palette.grey5 | BlauColors.palette.grey5 let textAppBarSelected = BlauColors.palette.blauBlueSecondary60 | BlauColors.palette.grey2 - let customTabsBackground = BlauColors.palette.blauBluePrimary | BlauColors.palette.darkModeBlack - let tagTextPromo = BlauColors.palette.blauPurple | BlauColors.palette.blauPurple30 - - let tagTextActive = BlauColors.palette.blauBluePrimary - - let tagTextInactive = BlauColors.palette.grey5 - + let tagTextActive = BlauColors.palette.blauBluePrimary | BlauColors.palette.blauBluePrimary + let tagTextInactive = BlauColors.palette.grey5 | BlauColors.palette.grey5 let tagTextSuccess = BlauColors.palette.blauGreen70 | BlauColors.palette.blauGreen30 - let tagTextWarning = BlauColors.palette.blauYellow70 | BlauColors.palette.blauYellow40 - let tagTextError = BlauColors.palette.blauRed70 | BlauColors.palette.blauRed40 - let tagBackgroundPromo = BlauColors.palette.blauPurple10 | BlauColors.palette.darkModeGrey6 - let tagBackgroundActive = BlauColors.palette.blauBlueSecondary10 | BlauColors.palette.darkModeGrey6 - let tagBackgroundInactive = BlauColors.palette.grey1 | BlauColors.palette.darkModeGrey6 - let tagBackgroundSuccess = BlauColors.palette.blauGreen10 | BlauColors.palette.darkModeGrey6 - let tagBackgroundWarning = BlauColors.palette.blauYellow10 | BlauColors.palette.darkModeGrey6 - let tagBackgroundError = BlauColors.palette.blauRed10 | BlauColors.palette.darkModeGrey6 + let cardContentOverlay = MisticaColor.gradient(MisticaGradient( + colors: + [ + BlauColors.palette.grey6.withAlphaComponent(0) | BlauColors.palette.grey6.withAlphaComponent(0), + BlauColors.palette.grey6.withAlphaComponent(0.4) | BlauColors.palette.grey6.withAlphaComponent(0.4), + BlauColors.palette.grey6.withAlphaComponent(0.7) | BlauColors.palette.grey6.withAlphaComponent(0.7) + ], + stops: [0, 0.3, 1], + angle: 180 + )) } public struct BlauColorPalette { diff --git a/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift b/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift index 661c505c..b8518211 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+Color.swift @@ -9,16 +9,16 @@ import SwiftUI public extension Color { - static var background: Color { - MisticaConfig.currentColors.background.color + static var backgroundBrandSecondary: Color { + MisticaConfig.currentColors.backgroundBrandSecondary.color } - static var backgroundAlternative: Color { - MisticaConfig.currentColors.backgroundAlternative.color + static var appBarBackground: Color { + MisticaConfig.currentColors.appBarBackground.color } - static var backgroundBrandSecondary: Color { - MisticaConfig.currentColors.backgroundBrandSecondary.color + static var background: Color { + MisticaConfig.currentColors.background.color } static var backgroundContainer: Color { @@ -65,20 +65,20 @@ public extension Color { MisticaConfig.currentColors.backgroundSkeletonInverse.color } - static var backgroundBrandTop: Color { - MisticaConfig.currentColors.backgroundBrandTop.color + static var navigationBarBackground: Color { + MisticaConfig.currentColors.navigationBarBackground.color } - static var backgroundBrandBottom: Color { - MisticaConfig.currentColors.backgroundBrandBottom.color + static var backgroundAlternative: Color { + MisticaConfig.currentColors.backgroundAlternative.color } - static var appBarBackground: Color { - MisticaConfig.currentColors.appBarBackground.color + static var backgroundBrandTop: Color { + MisticaConfig.currentColors.backgroundBrandTop.color } - static var navigationBarBackground: Color { - MisticaConfig.currentColors.navigationBarBackground.color + static var backgroundBrandBottom: Color { + MisticaConfig.currentColors.backgroundBrandBottom.color } static var skeletonWave: Color { @@ -169,6 +169,10 @@ public extension Color { MisticaConfig.currentColors.buttonSecondaryBorderSelected.color } + static var buttonSecondaryBorderInverse: Color { + MisticaConfig.currentColors.buttonSecondaryBorderInverse.color + } + static var buttonSecondaryBackgroundHover: Color { MisticaConfig.currentColors.buttonSecondaryBackgroundHover.color } @@ -177,10 +181,6 @@ public extension Color { MisticaConfig.currentColors.buttonSecondaryBackgroundSelected.color } - static var buttonSecondaryBorderInverse: Color { - MisticaConfig.currentColors.buttonSecondaryBorderInverse.color - } - static var buttonSecondaryBorderInverseSelected: Color { MisticaConfig.currentColors.buttonSecondaryBorderInverseSelected.color } @@ -361,14 +361,6 @@ public extension Color { MisticaConfig.currentColors.textSecondaryInverse.color } - static var success: Color { - MisticaConfig.currentColors.success.color - } - - static var warning: Color { - MisticaConfig.currentColors.warning.color - } - static var error: Color { MisticaConfig.currentColors.error.color } @@ -381,6 +373,14 @@ public extension Color { MisticaConfig.currentColors.textErrorInverse.color } + static var success: Color { + MisticaConfig.currentColors.success.color + } + + static var warning: Color { + MisticaConfig.currentColors.warning.color + } + static var promo: Color { MisticaConfig.currentColors.promo.color } diff --git a/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift b/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift index 33bcbe75..aed14ad8 100644 --- a/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift +++ b/Sources/MisticaCommon/Colors/ColorToolkit+UIColor.swift @@ -9,19 +9,19 @@ import UIKit public extension UIColor { - @objc(backgroundColor) - static var background: UIColor { - MisticaConfig.currentColors.background + @objc(backgroundBrandSecondaryColor) + static var backgroundBrandSecondary: UIColor { + MisticaConfig.currentColors.backgroundBrandSecondary } - @objc(backgroundAlternativeColor) - static var backgroundAlternative: UIColor { - MisticaConfig.currentColors.backgroundAlternative + @objc(appBarBackgroundColor) + static var appBarBackground: UIColor { + MisticaConfig.currentColors.appBarBackground } - @objc(backgroundBrandSecondaryColor) - static var backgroundBrandSecondary: UIColor { - MisticaConfig.currentColors.backgroundBrandSecondary + @objc(backgroundColor) + static var background: UIColor { + MisticaConfig.currentColors.background } @objc(backgroundContainerColor) @@ -79,6 +79,16 @@ public extension UIColor { MisticaConfig.currentColors.backgroundSkeletonInverse } + @objc(navigationBarBackgroundColor) + static var navigationBarBackground: UIColor { + MisticaConfig.currentColors.navigationBarBackground + } + + @objc(backgroundAlternativeColor) + static var backgroundAlternative: UIColor { + MisticaConfig.currentColors.backgroundAlternative + } + @objc(backgroundBrandTopColor) static var backgroundBrandTop: UIColor { MisticaConfig.currentColors.backgroundBrandTop @@ -89,16 +99,6 @@ public extension UIColor { MisticaConfig.currentColors.backgroundBrandBottom } - @objc(appBarBackgroundColor) - static var appBarBackground: UIColor { - MisticaConfig.currentColors.appBarBackground - } - - @objc(navigationBarBackgroundColor) - static var navigationBarBackground: UIColor { - MisticaConfig.currentColors.navigationBarBackground - } - @objc(skeletonWaveColor) static var skeletonWave: UIColor { MisticaConfig.currentColors.skeletonWave @@ -209,6 +209,11 @@ public extension UIColor { MisticaConfig.currentColors.buttonSecondaryBorderSelected } + @objc(buttonSecondaryBorderInverseColor) + static var buttonSecondaryBorderInverse: UIColor { + MisticaConfig.currentColors.buttonSecondaryBorderInverse + } + @objc(buttonSecondaryBackgroundHoverColor) static var buttonSecondaryBackgroundHover: UIColor { MisticaConfig.currentColors.buttonSecondaryBackgroundHover @@ -219,11 +224,6 @@ public extension UIColor { MisticaConfig.currentColors.buttonSecondaryBackgroundSelected } - @objc(buttonSecondaryBorderInverseColor) - static var buttonSecondaryBorderInverse: UIColor { - MisticaConfig.currentColors.buttonSecondaryBorderInverse - } - @objc(buttonSecondaryBorderInverseSelectedColor) static var buttonSecondaryBorderInverseSelected: UIColor { MisticaConfig.currentColors.buttonSecondaryBorderInverseSelected @@ -449,16 +449,6 @@ public extension UIColor { MisticaConfig.currentColors.textSecondaryInverse } - @objc(successColor) - static var success: UIColor { - MisticaConfig.currentColors.success - } - - @objc(warningColor) - static var warning: UIColor { - MisticaConfig.currentColors.warning - } - @objc(errorColor) static var error: UIColor { MisticaConfig.currentColors.error @@ -474,6 +464,16 @@ public extension UIColor { MisticaConfig.currentColors.textErrorInverse } + @objc(successColor) + static var success: UIColor { + MisticaConfig.currentColors.success + } + + @objc(warningColor) + static var warning: UIColor { + MisticaConfig.currentColors.warning + } + @objc(promoColor) static var promo: UIColor { MisticaConfig.currentColors.promo @@ -644,12 +644,3 @@ public extension UIColor { MisticaConfig.currentColors.tagBackgroundError } } - -public extension BrandStyle { - var preferredStatusBarStyle: UIStatusBarStyle { - switch self { - case .movistar, .vivo, .o2, .o2New, .blau, .custom, .vivoNew, .tu, .telefonica: - return .lightContent - } - } -} diff --git a/Sources/MisticaCommon/Colors/MisticaColor.swift b/Sources/MisticaCommon/Colors/MisticaColor.swift index 50ec3eeb..a528231c 100644 --- a/Sources/MisticaCommon/Colors/MisticaColor.swift +++ b/Sources/MisticaCommon/Colors/MisticaColor.swift @@ -21,4 +21,8 @@ public extension MisticaColor { static var backgroundContainerBrand: MisticaColor { MisticaConfig.currentColors.backgroundContainerBrand } + + static var cardContentOverlay: MisticaColor { + MisticaConfig.currentColors.cardContentOverlay + } } diff --git a/Sources/MisticaCommon/Colors/MisticaColors.swift b/Sources/MisticaCommon/Colors/MisticaColors.swift index f26c1b4b..0619575e 100644 --- a/Sources/MisticaCommon/Colors/MisticaColors.swift +++ b/Sources/MisticaCommon/Colors/MisticaColors.swift @@ -9,10 +9,10 @@ import UIKit public protocol MisticaColors { - var background: UIColor { get } - var backgroundAlternative: UIColor { get } var backgroundBrand: MisticaColor { get } var backgroundBrandSecondary: UIColor { get } + var appBarBackground: UIColor { get } + var background: UIColor { get } var backgroundContainer: UIColor { get } var backgroundContainerError: UIColor { get } var backgroundContainerHover: UIColor { get } @@ -25,10 +25,10 @@ public protocol MisticaColors { var backgroundOverlay: UIColor { get } var backgroundSkeleton: UIColor { get } var backgroundSkeletonInverse: UIColor { get } + var navigationBarBackground: UIColor { get } + var backgroundAlternative: UIColor { get } var backgroundBrandTop: UIColor { get } var backgroundBrandBottom: UIColor { get } - var appBarBackground: UIColor { get } - var navigationBarBackground: UIColor { get } var skeletonWave: UIColor { get } var borderLow: UIColor { get } var border: UIColor { get } @@ -51,9 +51,9 @@ public protocol MisticaColors { var buttonPrimaryBackgroundInverseSelected: UIColor { get } var buttonSecondaryBorder: UIColor { get } var buttonSecondaryBorderSelected: UIColor { get } + var buttonSecondaryBorderInverse: UIColor { get } var buttonSecondaryBackgroundHover: UIColor { get } var buttonSecondaryBackgroundSelected: UIColor { get } - var buttonSecondaryBorderInverse: UIColor { get } var buttonSecondaryBorderInverseSelected: UIColor { get } var buttonSecondaryBackgroundInverseHover: UIColor { get } var buttonSecondaryBackgroundInverseSelected: UIColor { get } @@ -99,11 +99,11 @@ public protocol MisticaColors { var textPrimaryInverse: UIColor { get } var textSecondary: UIColor { get } var textSecondaryInverse: UIColor { get } - var success: UIColor { get } - var warning: UIColor { get } var error: UIColor { get } var textError: UIColor { get } var textErrorInverse: UIColor { get } + var success: UIColor { get } + var warning: UIColor { get } var promo: UIColor { get } var highlight: UIColor { get } var successLow: UIColor { get } @@ -138,4 +138,5 @@ public protocol MisticaColors { var tagBackgroundSuccess: UIColor { get } var tagBackgroundWarning: UIColor { get } var tagBackgroundError: UIColor { get } + var cardContentOverlay: MisticaColor { get } } diff --git a/Sources/MisticaCommon/Colors/MovistarColorPalette.swift b/Sources/MisticaCommon/Colors/MovistarColorPalette.swift index 6d244f27..49b5b86f 100644 --- a/Sources/MisticaCommon/Colors/MovistarColorPalette.swift +++ b/Sources/MisticaCommon/Colors/MovistarColorPalette.swift @@ -10,264 +10,145 @@ import UIKit struct MovistarColors: MisticaColors { static let palette = MovistarColorPalette() - - let background = MovistarColors.palette.white | MovistarColors.palette.darkModeBlack - - let backgroundAlternative = MovistarColors.palette.grey1 | MovistarColors.palette.darkModeBlack - let backgroundBrand = MisticaColor.solid(MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack) - let backgroundBrandSecondary = MovistarColors.palette.movistarBlueDark | MovistarColors.palette.darkModeBlack - + let appBarBackground = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey + let background = MovistarColors.palette.white | MovistarColors.palette.darkModeBlack let backgroundContainer = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey - let backgroundContainerError = MovistarColors.palette.pepper10 | MovistarColors.palette.darkModeGrey - let backgroundContainerHover = MovistarColors.palette.black.withAlphaComponent(0.03) | MovistarColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerPressed = MovistarColors.palette.black.withAlphaComponent(0.05) | MovistarColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = MisticaColor.solid(MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeGrey) - let backgroundContainerBrandHover = MovistarColors.palette.black.withAlphaComponent(0.1) | MovistarColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerBrandPressed = MovistarColors.palette.black.withAlphaComponent(0.2) | MovistarColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrandOverInverse = MovistarColors.palette.movistarBlue55 | MovistarColors.palette.darkModeGrey - let backgroundContainerAlternative = MovistarColors.palette.grey1 | MovistarColors.palette.darkModeGrey - let backgroundOverlay = MovistarColors.palette.movistarBlueDark.withAlphaComponent(0.6) | MovistarColors.palette.darkModeGrey.withAlphaComponent(0.8) - let backgroundSkeleton = MovistarColors.palette.grey2 | MovistarColors.palette.darkModeGrey6 - let backgroundSkeletonInverse = MovistarColors.palette.movistarBlue55 | MovistarColors.palette.darkModeGrey6 - + let navigationBarBackground = MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack + let backgroundAlternative = MovistarColors.palette.grey1 | MovistarColors.palette.darkModeBlack let backgroundBrandTop = MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack - let backgroundBrandBottom = MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack - - let appBarBackground = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey - - let navigationBarBackground = MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack - let skeletonWave = MovistarColors.palette.grey2 | MovistarColors.palette.darkModeGrey6 - let borderLow = MovistarColors.palette.grey1 | MovistarColors.palette.darkModeBlack - let border = MovistarColors.palette.grey3 | MovistarColors.palette.darkModeGrey - let borderHigh = MovistarColors.palette.grey5 | MovistarColors.palette.darkModeGrey5 - - let borderSelected = MovistarColors.palette.movistarBlue - + let borderSelected = MovistarColors.palette.movistarBlue | MovistarColors.palette.movistarBlue let coverBackgroundHover = MovistarColors.palette.black.withAlphaComponent(0.25) | MovistarColors.palette.darkModeBlack.withAlphaComponent(0.25) - let coverBackgroundPressed = MovistarColors.palette.black.withAlphaComponent(0.35) | MovistarColors.palette.darkModeBlack.withAlphaComponent(0.35) - - let buttonDangerBackground = MovistarColors.palette.pepper55 - - let buttonDangerBackgroundSelected = MovistarColors.palette.pepper70 - - let buttonDangerBackgroundHover = MovistarColors.palette.pepper65 - + let buttonDangerBackground = MovistarColors.palette.pepper55 | MovistarColors.palette.pepper55 + let buttonDangerBackgroundSelected = MovistarColors.palette.pepper70 | MovistarColors.palette.pepper70 + let buttonDangerBackgroundHover = MovistarColors.palette.pepper65 | MovistarColors.palette.pepper65 let buttonLinkDangerBackgroundSelected = MovistarColors.palette.pepper10 | MovistarColors.palette.white.withAlphaComponent(0.08) - let buttonLinkDangerBackgroundInverse = MovistarColors.palette.white | MovistarColors.palette.white.withAlphaComponent(0) - let buttonLinkDangerBackgroundInverseSelected = MovistarColors.palette.pepper10 | MovistarColors.palette.white.withAlphaComponent(0.08) - let buttonLinkBackgroundSelected = MovistarColors.palette.movistarBlue10 | MovistarColors.palette.white.withAlphaComponent(0.08) - let buttonLinkBackgroundInverseSelected = MovistarColors.palette.white.withAlphaComponent(0.2) | MovistarColors.palette.white.withAlphaComponent(0.08) - - let buttonPrimaryBackground = MovistarColors.palette.movistarBlueHC - + let buttonPrimaryBackground = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.movistarBlueHC let buttonPrimaryBackgroundInverse = MovistarColors.palette.white | MovistarColors.palette.movistarBlueHC - - let buttonPrimaryBackgroundSelected = MovistarColors.palette.movistarBlueHC65 - - let buttonPrimaryBackgroundHover = MovistarColors.palette.movistarBlueHC55 - + let buttonPrimaryBackgroundSelected = MovistarColors.palette.movistarBlueHC65 | MovistarColors.palette.movistarBlueHC65 + let buttonPrimaryBackgroundHover = MovistarColors.palette.movistarBlueHC55 | MovistarColors.palette.movistarBlueHC55 let buttonPrimaryBackgroundInverseSelected = MovistarColors.palette.movistarBlue10 | MovistarColors.palette.movistarBlueHC65 - let buttonSecondaryBorder = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.white - let buttonSecondaryBorderSelected = MovistarColors.palette.movistarBlueHC65 | MovistarColors.palette.white - + let buttonSecondaryBorderInverse = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 let buttonSecondaryBackgroundHover = MovistarColors.palette.movistarBlue10 | MovistarColors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundSelected = MovistarColors.palette.movistarBlue15 | MovistarColors.palette.white.withAlphaComponent(0.25) - - let buttonSecondaryBorderInverse = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 - let buttonSecondaryBorderInverseSelected = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 - let buttonSecondaryBackgroundInverseHover = MovistarColors.palette.white.withAlphaComponent(0.2) | MovistarColors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundInverseSelected = MovistarColors.palette.white.withAlphaComponent(0.3) | MovistarColors.palette.white.withAlphaComponent(0.25) - - let textButtonPrimary = MovistarColors.palette.white - + let textButtonPrimary = MovistarColors.palette.white | MovistarColors.palette.white let textButtonPrimaryInverse = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.white - let textButtonPrimaryInverseSelected = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.white - let textButtonSecondary = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.darkModeGrey2 - let textButtonSecondarySelected = MovistarColors.palette.movistarBlueHC55 | MovistarColors.palette.darkModeGrey2 - let textButtonSecondaryInverse = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 - let textButtonSecondaryInverseSelected = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 - let textLink = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.movistarBlue - let textLinkInverse = MovistarColors.palette.white | MovistarColors.palette.movistarBlue - let textLinkDanger = MovistarColors.palette.pepper60 | MovistarColors.palette.pepper45 - let textLinkSnackbar = MovistarColors.palette.movistarBlue30 | MovistarColors.palette.movistarBlue - let textActivated = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.movistarBlue - let textBrand = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.movistarBlue - let control = MovistarColors.palette.grey4 | MovistarColors.palette.darkModeGrey4 - - let controlActivated = MovistarColors.palette.movistarBlue - + let controlActivated = MovistarColors.palette.movistarBlue | MovistarColors.palette.movistarBlue let controlInverse = MovistarColors.palette.movistarBlue20 | MovistarColors.palette.darkModeGrey4 - let controlActivatedInverse = MovistarColors.palette.white | MovistarColors.palette.movistarBlue - let controlError = MovistarColors.palette.pepper55 | MovistarColors.palette.pepper45 - let barTrack = MovistarColors.palette.grey3 | MovistarColors.palette.darkModeGrey6 - - let loadingBar = MovistarColors.palette.movistarBlue - + let loadingBar = MovistarColors.palette.movistarBlue | MovistarColors.palette.movistarBlue let loadingBarBackground = MovistarColors.palette.grey2 | MovistarColors.palette.darkModeGrey6 - let toggleAndroidInactive = MovistarColors.palette.grey2 | MovistarColors.palette.darkModeGrey2 - - let toggleAndroidBackgroundActive = MovistarColors.palette.movistarBlue20 - + let toggleAndroidBackgroundActive = MovistarColors.palette.movistarBlue20 | MovistarColors.palette.movistarBlue20 let iosControlKnob = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 - let divider = MovistarColors.palette.grey3 | MovistarColors.palette.white.withAlphaComponent(0.1) - let dividerInverse = MovistarColors.palette.white.withAlphaComponent(0.2) | MovistarColors.palette.white.withAlphaComponent(0.1) - let navigationBarDivider = MovistarColors.palette.movistarBlue | MovistarColors.palette.darkModeBlack - - let badge = MovistarColors.palette.pepper55 - - let feedbackErrorBackground = MovistarColors.palette.pepper55 - - let feedbackInfoBackground = MovistarColors.palette.movistarBlueDark - - let brand = MovistarColors.palette.movistarBlue - + let badge = MovistarColors.palette.pepper55 | MovistarColors.palette.pepper55 + let feedbackErrorBackground = MovistarColors.palette.pepper55 | MovistarColors.palette.pepper55 + let feedbackInfoBackground = MovistarColors.palette.movistarBlueDark | MovistarColors.palette.movistarBlueDark + let brand = MovistarColors.palette.movistarBlue | MovistarColors.palette.movistarBlue let brandHigh = MovistarColors.palette.movistarBlue55 | MovistarColors.palette.movistarBlue40 - let inverse = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 - let neutralHigh = MovistarColors.palette.movistarBlueDark | MovistarColors.palette.darkModeGrey2 - let neutralMedium = MovistarColors.palette.grey5 | MovistarColors.palette.darkModeGrey5 - - let neutralMediumInverse = MovistarColors.palette.grey5 - + let neutralMediumInverse = MovistarColors.palette.grey5 | MovistarColors.palette.grey5 let neutralLow = MovistarColors.palette.grey1 | MovistarColors.palette.darkModeGrey6 - let neutralLowAlternative = MovistarColors.palette.grey2 | MovistarColors.palette.darkModeGrey6 - let textPrimary = MovistarColors.palette.movistarBlueDark | MovistarColors.palette.darkModeGrey2 - let textPrimaryInverse = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 - let textSecondary = MovistarColors.palette.grey5 | MovistarColors.palette.darkModeGrey4 - let textSecondaryInverse = MovistarColors.palette.movistarBlue10 | MovistarColors.palette.darkModeGrey4 - - let success = MovistarColors.palette.movistarGreen55 | MovistarColors.palette.movistarGreen - - let warning = MovistarColors.palette.egg55 | MovistarColors.palette.egg - let error = MovistarColors.palette.pepper55 | MovistarColors.palette.pepper45 - let textError = MovistarColors.palette.pepper55 | MovistarColors.palette.pepper45 - let textErrorInverse = MovistarColors.palette.white | MovistarColors.palette.pepper45 - + let success = MovistarColors.palette.movistarGreen55 | MovistarColors.palette.movistarGreen + let warning = MovistarColors.palette.egg55 | MovistarColors.palette.egg let promo = MovistarColors.palette.purple | MovistarColors.palette.purple40 - let highlight = MovistarColors.palette.pink55 | MovistarColors.palette.pink45 - let successLow = MovistarColors.palette.movistarGreen10 | MovistarColors.palette.darkModeGrey7 - let warningLow = MovistarColors.palette.egg10 | MovistarColors.palette.darkModeGrey7 - let errorLow = MovistarColors.palette.pepper10 | MovistarColors.palette.darkModeGrey7 - let promoLow = MovistarColors.palette.purple10 | MovistarColors.palette.darkModeGrey7 - let brandLow = MovistarColors.palette.movistarBlue10 | MovistarColors.palette.darkModeGrey7 - let successHigh = MovistarColors.palette.movistarGreen70 | MovistarColors.palette.movistarGreen40 - let warningHigh = MovistarColors.palette.egg80 | MovistarColors.palette.egg40 - let errorHigh = MovistarColors.palette.pepper70 | MovistarColors.palette.pepper45 - let promoHigh = MovistarColors.palette.purple70 | MovistarColors.palette.purple35 - - let successHighInverse = MovistarColors.palette.movistarGreen70 - - let warningHighInverse = MovistarColors.palette.egg80 - - let errorHighInverse = MovistarColors.palette.pepper70 - - let promoHighInverse = MovistarColors.palette.purple70 - + let successHighInverse = MovistarColors.palette.movistarGreen70 | MovistarColors.palette.movistarGreen70 + let warningHighInverse = MovistarColors.palette.egg80 | MovistarColors.palette.egg80 + let errorHighInverse = MovistarColors.palette.pepper70 | MovistarColors.palette.pepper70 + let promoHighInverse = MovistarColors.palette.purple70 | MovistarColors.palette.purple70 let textNavigationBarPrimary = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 - let textNavigationBarSecondary = MovistarColors.palette.movistarBlue20 | MovistarColors.palette.darkModeGrey4 - let textNavigationSearchBarHint = MovistarColors.palette.movistarBlue20 | MovistarColors.palette.darkModeGrey4 - let textNavigationSearchBarText = MovistarColors.palette.white | MovistarColors.palette.darkModeGrey2 - let textAppBar = MovistarColors.palette.grey5 | MovistarColors.palette.darkModeGrey4 - let textAppBarSelected = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.movistarBlue - let customTabsBackground = MovistarColors.palette.white | MovistarColors.palette.darkModeBlack - let tagTextPromo = MovistarColors.palette.purple70 | MovistarColors.palette.purple35 - let tagTextActive = MovistarColors.palette.movistarBlueHC | MovistarColors.palette.movistarBlue - let tagTextInactive = MovistarColors.palette.grey5 | MovistarColors.palette.darkModeGrey3 - let tagTextSuccess = MovistarColors.palette.movistarGreen70 | MovistarColors.palette.movistarGreen40 - let tagTextWarning = MovistarColors.palette.egg80 | MovistarColors.palette.egg40 - let tagTextError = MovistarColors.palette.pepper70 | MovistarColors.palette.pepper45 - let tagBackgroundPromo = MovistarColors.palette.purple10 | MovistarColors.palette.darkModeGrey7 - let tagBackgroundActive = MovistarColors.palette.movistarBlue10 | MovistarColors.palette.darkModeGrey7 - let tagBackgroundInactive = MovistarColors.palette.grey1 | MovistarColors.palette.darkModeGrey7 - let tagBackgroundSuccess = MovistarColors.palette.movistarGreen10 | MovistarColors.palette.darkModeGrey7 - let tagBackgroundWarning = MovistarColors.palette.egg10 | MovistarColors.palette.darkModeGrey7 - let tagBackgroundError = MovistarColors.palette.pepper10 | MovistarColors.palette.darkModeGrey7 + let cardContentOverlay = MisticaColor.gradient(MisticaGradient( + colors: + [ + MovistarColors.palette.black.withAlphaComponent(0) | MovistarColors.palette.black.withAlphaComponent(0), + MovistarColors.palette.black.withAlphaComponent(0.4) | MovistarColors.palette.black.withAlphaComponent(0.4), + MovistarColors.palette.black.withAlphaComponent(0.7) | MovistarColors.palette.black.withAlphaComponent(0.7) + ], + stops: [0, 0.3, 1], + angle: 180 + )) } public struct MovistarColorPalette { diff --git a/Sources/MisticaCommon/Colors/O2ColorPalette.swift b/Sources/MisticaCommon/Colors/O2ColorPalette.swift index fb9f21b9..8f335276 100644 --- a/Sources/MisticaCommon/Colors/O2ColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2ColorPalette.swift @@ -10,264 +10,145 @@ import UIKit struct O2Colors: MisticaColors { static let palette = O2ColorPalette() - - let background = O2Colors.palette.white | O2Colors.palette.darkModeBlack - - let backgroundAlternative = O2Colors.palette.grey1 | O2Colors.palette.darkModeBlack - let backgroundBrand = MisticaColor.solid(O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack) - let backgroundBrandSecondary = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack - + let appBarBackground = O2Colors.palette.white | O2Colors.palette.darkModeGrey + let background = O2Colors.palette.white | O2Colors.palette.darkModeBlack let backgroundContainer = O2Colors.palette.white | O2Colors.palette.darkModeGrey - let backgroundContainerError = O2Colors.palette.pepper10 | O2Colors.palette.darkModeGrey - let backgroundContainerHover = O2Colors.palette.darkModeBlack.withAlphaComponent(0.03) | O2Colors.palette.white.withAlphaComponent(0.03) - let backgroundContainerPressed = O2Colors.palette.darkModeBlack.withAlphaComponent(0.05) | O2Colors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = MisticaColor.solid(O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeGrey) - let backgroundContainerBrandHover = O2Colors.palette.darkModeBlack.withAlphaComponent(0.2) | O2Colors.palette.white.withAlphaComponent(0.03) - let backgroundContainerBrandPressed = O2Colors.palette.darkModeBlack.withAlphaComponent(0.4) | O2Colors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrandOverInverse = O2Colors.palette.o2BluePrimary70 | O2Colors.palette.darkModeGrey - let backgroundContainerAlternative = O2Colors.palette.grey1 | O2Colors.palette.darkModeGrey - let backgroundOverlay = O2Colors.palette.grey6.withAlphaComponent(0.6) | O2Colors.palette.darkModeGrey.withAlphaComponent(0.8) - let backgroundSkeleton = O2Colors.palette.grey2 | O2Colors.palette.darkModeGrey6 - let backgroundSkeletonInverse = O2Colors.palette.o2BluePrimary70 | O2Colors.palette.darkModeGrey6 - + let navigationBarBackground = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack + let backgroundAlternative = O2Colors.palette.grey1 | O2Colors.palette.darkModeBlack let backgroundBrandTop = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack - let backgroundBrandBottom = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack - - let appBarBackground = O2Colors.palette.white | O2Colors.palette.darkModeGrey - - let navigationBarBackground = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack - let skeletonWave = O2Colors.palette.grey2 | O2Colors.palette.grey5 - let borderLow = O2Colors.palette.grey1 | O2Colors.palette.darkModeBlack - let border = O2Colors.palette.grey3 | O2Colors.palette.darkModeGrey - - let borderHigh = O2Colors.palette.grey5 - + let borderHigh = O2Colors.palette.grey5 | O2Colors.palette.grey5 let borderSelected = O2Colors.palette.o2BluePrimary | O2Colors.palette.o2BluePrimary30 - - let coverBackgroundHover = O2Colors.palette.darkModeBlack.withAlphaComponent(0.25) - - let coverBackgroundPressed = O2Colors.palette.darkModeBlack.withAlphaComponent(0.35) - - let buttonDangerBackground = O2Colors.palette.pepper - - let buttonDangerBackgroundSelected = O2Colors.palette.pepper60 - - let buttonDangerBackgroundHover = O2Colors.palette.pepper60 - + let coverBackgroundHover = O2Colors.palette.darkModeBlack.withAlphaComponent(0.25) | O2Colors.palette.darkModeBlack.withAlphaComponent(0.25) + let coverBackgroundPressed = O2Colors.palette.darkModeBlack.withAlphaComponent(0.35) | O2Colors.palette.darkModeBlack.withAlphaComponent(0.35) + let buttonDangerBackground = O2Colors.palette.pepper | O2Colors.palette.pepper + let buttonDangerBackgroundSelected = O2Colors.palette.pepper60 | O2Colors.palette.pepper60 + let buttonDangerBackgroundHover = O2Colors.palette.pepper60 | O2Colors.palette.pepper60 let buttonLinkDangerBackgroundSelected = O2Colors.palette.pepper10 | O2Colors.palette.white.withAlphaComponent(0.08) - let buttonLinkDangerBackgroundInverse = O2Colors.palette.white | O2Colors.palette.white.withAlphaComponent(0) - let buttonLinkDangerBackgroundInverseSelected = O2Colors.palette.pepper10 | O2Colors.palette.white.withAlphaComponent(0.08) - let buttonLinkBackgroundSelected = O2Colors.palette.o2BluePrimary10 | O2Colors.palette.white.withAlphaComponent(0.08) - - let buttonLinkBackgroundInverseSelected = O2Colors.palette.white.withAlphaComponent(0.08) - + let buttonLinkBackgroundInverseSelected = O2Colors.palette.white.withAlphaComponent(0.08) | O2Colors.palette.white.withAlphaComponent(0.08) let buttonPrimaryBackground = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeO2BluePrimary - let buttonPrimaryBackgroundInverse = O2Colors.palette.white | O2Colors.palette.darkModeO2BluePrimary - let buttonPrimaryBackgroundSelected = O2Colors.palette.o2BluePrimary70 | O2Colors.palette.darkModeO2BluePrimaryDark - let buttonPrimaryBackgroundHover = O2Colors.palette.o2BluePrimary70 | O2Colors.palette.darkModeO2BluePrimaryDark - let buttonPrimaryBackgroundInverseSelected = O2Colors.palette.o2BluePrimary30 | O2Colors.palette.darkModeO2BluePrimaryDark - let buttonSecondaryBorder = O2Colors.palette.o2BluePrimary | O2Colors.palette.white - let buttonSecondaryBorderSelected = O2Colors.palette.o2BluePrimary70 | O2Colors.palette.white - + let buttonSecondaryBorderInverse = O2Colors.palette.white | O2Colors.palette.white let buttonSecondaryBackgroundHover = O2Colors.palette.o2BluePrimary10 | O2Colors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundSelected = O2Colors.palette.o2BluePrimary10 | O2Colors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBorderInverse = O2Colors.palette.white - let buttonSecondaryBorderInverseSelected = O2Colors.palette.o2BluePrimary30 | O2Colors.palette.white - - let buttonSecondaryBackgroundInverseHover = O2Colors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBackgroundInverseSelected = O2Colors.palette.white.withAlphaComponent(0.15) - + let buttonSecondaryBackgroundInverseHover = O2Colors.palette.white.withAlphaComponent(0.15) | O2Colors.palette.white.withAlphaComponent(0.15) + let buttonSecondaryBackgroundInverseSelected = O2Colors.palette.white.withAlphaComponent(0.15) | O2Colors.palette.white.withAlphaComponent(0.15) let textButtonPrimary = O2Colors.palette.white | O2Colors.palette.grey2 - let textButtonPrimaryInverse = O2Colors.palette.o2BluePrimary | O2Colors.palette.grey2 - let textButtonPrimaryInverseSelected = O2Colors.palette.o2BluePrimary70 | O2Colors.palette.grey2 - let textButtonSecondary = O2Colors.palette.o2BluePrimary | O2Colors.palette.grey2 - let textButtonSecondarySelected = O2Colors.palette.o2BluePrimary70 | O2Colors.palette.grey2 - let textButtonSecondaryInverse = O2Colors.palette.white | O2Colors.palette.grey2 - let textButtonSecondaryInverseSelected = O2Colors.palette.white | O2Colors.palette.grey2 - let textLink = O2Colors.palette.o2BluePrimary | O2Colors.palette.o2BluePrimary30 - let textLinkInverse = O2Colors.palette.white | O2Colors.palette.o2BluePrimary30 - - let textLinkDanger = O2Colors.palette.pepper - - let textLinkSnackbar = O2Colors.palette.o2BluePrimary30 - + let textLinkDanger = O2Colors.palette.pepper | O2Colors.palette.pepper + let textLinkSnackbar = O2Colors.palette.o2BluePrimary30 | O2Colors.palette.o2BluePrimary30 let textActivated = O2Colors.palette.o2BluePrimary | O2Colors.palette.o2BluePrimary30 - let textBrand = O2Colors.palette.o2BluePrimary | O2Colors.palette.o2BluePrimary30 - let control = O2Colors.palette.grey3 | O2Colors.palette.darkModeGrey6 - let controlActivated = O2Colors.palette.o2BluePrimary | O2Colors.palette.o2BluePrimary30 - let controlInverse = O2Colors.palette.o2BluePrimary30 | O2Colors.palette.darkModeGrey6 - let controlActivatedInverse = O2Colors.palette.white | O2Colors.palette.o2BluePrimary30 - - let controlError = O2Colors.palette.pepper - + let controlError = O2Colors.palette.pepper | O2Colors.palette.pepper let barTrack = O2Colors.palette.grey3 | O2Colors.palette.darkModeGrey6 - let loadingBar = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeO2BluePrimary - let loadingBarBackground = O2Colors.palette.grey1 | O2Colors.palette.darkModeGrey6 - let toggleAndroidInactive = O2Colors.palette.grey2 | O2Colors.palette.grey4 - let toggleAndroidBackgroundActive = O2Colors.palette.o2BluePrimary15 | O2Colors.palette.o2BlueLight30 - let iosControlKnob = O2Colors.palette.white | O2Colors.palette.grey2 - let divider = O2Colors.palette.grey2 | O2Colors.palette.white.withAlphaComponent(0.05) - let dividerInverse = O2Colors.palette.white.withAlphaComponent(0.2) | O2Colors.palette.white.withAlphaComponent(0.05) - let navigationBarDivider = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack - - let badge = O2Colors.palette.pepper60 - - let feedbackErrorBackground = O2Colors.palette.pepper - + let badge = O2Colors.palette.pepper60 | O2Colors.palette.pepper60 + let feedbackErrorBackground = O2Colors.palette.pepper | O2Colors.palette.pepper let feedbackInfoBackground = O2Colors.palette.grey6 | O2Colors.palette.darkModeGrey6 - let brand = O2Colors.palette.o2BluePrimary | O2Colors.palette.o2BluePrimary30 - let brandHigh = O2Colors.palette.o2BluePrimary70 | O2Colors.palette.white.withAlphaComponent(0.05) - let inverse = O2Colors.palette.white | O2Colors.palette.grey2 - let neutralHigh = O2Colors.palette.grey6 | O2Colors.palette.grey2 - - let neutralMedium = O2Colors.palette.grey5 - - let neutralMediumInverse = O2Colors.palette.grey5 - + let neutralMedium = O2Colors.palette.grey5 | O2Colors.palette.grey5 + let neutralMediumInverse = O2Colors.palette.grey5 | O2Colors.palette.grey5 let neutralLow = O2Colors.palette.grey1 | O2Colors.palette.darkModeGrey6 - let neutralLowAlternative = O2Colors.palette.grey2 | O2Colors.palette.darkModeGrey6 - let textPrimary = O2Colors.palette.grey6 | O2Colors.palette.grey2 - let textPrimaryInverse = O2Colors.palette.white | O2Colors.palette.grey2 - let textSecondary = O2Colors.palette.grey5 | O2Colors.palette.grey4 - let textSecondaryInverse = O2Colors.palette.o2BluePrimary15 | O2Colors.palette.grey4 - - let success = O2Colors.palette.o2Green - - let warning = O2Colors.palette.o2Orange - - let error = O2Colors.palette.pepper - - let textError = O2Colors.palette.pepper - + let error = O2Colors.palette.pepper | O2Colors.palette.pepper + let textError = O2Colors.palette.pepper | O2Colors.palette.pepper let textErrorInverse = O2Colors.palette.white | O2Colors.palette.pepper - - let promo = O2Colors.palette.o2Purple - - let highlight = O2Colors.palette.o2Pink - + let success = O2Colors.palette.o2Green | O2Colors.palette.o2Green + let warning = O2Colors.palette.o2Orange | O2Colors.palette.o2Orange + let promo = O2Colors.palette.o2Purple | O2Colors.palette.o2Purple + let highlight = O2Colors.palette.o2Pink | O2Colors.palette.o2Pink let successLow = O2Colors.palette.o2Green10 | O2Colors.palette.darkModeGrey6 - let warningLow = O2Colors.palette.o2Orange10 | O2Colors.palette.darkModeGrey6 - let errorLow = O2Colors.palette.pepper10 | O2Colors.palette.darkModeGrey6 - let promoLow = O2Colors.palette.o2Purple10 | O2Colors.palette.darkModeGrey6 - let brandLow = O2Colors.palette.o2BluePrimary10 | O2Colors.palette.darkModeGrey6 - let successHigh = O2Colors.palette.o2Green80 | O2Colors.palette.o2Green40 - let warningHigh = O2Colors.palette.o2Orange75 | O2Colors.palette.o2Orange40 - let errorHigh = O2Colors.palette.pepper60 | O2Colors.palette.pepper40 - let promoHigh = O2Colors.palette.o2Purple | O2Colors.palette.o2Purple30 - - let successHighInverse = O2Colors.palette.o2Green80 - - let warningHighInverse = O2Colors.palette.o2Orange75 - - let errorHighInverse = O2Colors.palette.pepper60 - - let promoHighInverse = O2Colors.palette.o2Purple - + let successHighInverse = O2Colors.palette.o2Green80 | O2Colors.palette.o2Green80 + let warningHighInverse = O2Colors.palette.o2Orange75 | O2Colors.palette.o2Orange75 + let errorHighInverse = O2Colors.palette.pepper60 | O2Colors.palette.pepper60 + let promoHighInverse = O2Colors.palette.o2Purple | O2Colors.palette.o2Purple let textNavigationBarPrimary = O2Colors.palette.white | O2Colors.palette.grey2 - let textNavigationBarSecondary = O2Colors.palette.o2BluePrimary30 | O2Colors.palette.grey4 - let textNavigationSearchBarHint = O2Colors.palette.o2BluePrimary30 | O2Colors.palette.grey4 - let textNavigationSearchBarText = O2Colors.palette.white | O2Colors.palette.grey2 - let textAppBar = O2Colors.palette.grey4 | O2Colors.palette.grey5 - let textAppBarSelected = O2Colors.palette.o2BluePrimary | O2Colors.palette.grey2 - let customTabsBackground = O2Colors.palette.o2BluePrimary | O2Colors.palette.darkModeBlack - let tagTextPromo = O2Colors.palette.o2Purple | O2Colors.palette.o2Purple30 - let tagTextActive = O2Colors.palette.o2BluePrimary | O2Colors.palette.o2BluePrimary30 - - let tagTextInactive = O2Colors.palette.grey5 - + let tagTextInactive = O2Colors.palette.grey5 | O2Colors.palette.grey5 let tagTextSuccess = O2Colors.palette.o2Green80 | O2Colors.palette.o2Green40 - let tagTextWarning = O2Colors.palette.o2Orange75 | O2Colors.palette.o2Orange40 - let tagTextError = O2Colors.palette.pepper60 | O2Colors.palette.pepper40 - let tagBackgroundPromo = O2Colors.palette.o2Purple10 | O2Colors.palette.darkModeGrey6 - let tagBackgroundActive = O2Colors.palette.o2BluePrimary10 | O2Colors.palette.darkModeGrey6 - let tagBackgroundInactive = O2Colors.palette.grey1 | O2Colors.palette.darkModeGrey6 - let tagBackgroundSuccess = O2Colors.palette.o2Green10 | O2Colors.palette.darkModeGrey6 - let tagBackgroundWarning = O2Colors.palette.o2Orange10 | O2Colors.palette.darkModeGrey6 - let tagBackgroundError = O2Colors.palette.pepper10 | O2Colors.palette.darkModeGrey6 + let cardContentOverlay = MisticaColor.gradient(MisticaGradient( + colors: + [ + O2Colors.palette.black.withAlphaComponent(0) | O2Colors.palette.black.withAlphaComponent(0), + O2Colors.palette.black.withAlphaComponent(0.4) | O2Colors.palette.black.withAlphaComponent(0.4), + O2Colors.palette.black.withAlphaComponent(0.7) | O2Colors.palette.black.withAlphaComponent(0.7) + ], + stops: [0, 0.3, 1], + angle: 180 + )) } public struct O2ColorPalette { diff --git a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift index ecadc51e..77a21877 100644 --- a/Sources/MisticaCommon/Colors/O2NewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/O2NewColorPalette.swift @@ -10,9 +10,6 @@ import UIKit struct O2NewColors: MisticaColors { static let palette = O2NewColorPalette() - - let background = O2NewColors.palette.white | O2NewColors.palette.darkModeBlack - let backgroundBrand = MisticaColor.gradient(MisticaGradient( colors: [ @@ -23,7 +20,13 @@ struct O2NewColors: MisticaColors { stops: [0, 0.64, 1], angle: 180 )) - + let backgroundBrandSecondary = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBlack + let appBarBackground = O2NewColors.palette.white | O2NewColors.palette.darkModeGrey + let background = O2NewColors.palette.white | O2NewColors.palette.darkModeBlack + let backgroundContainer = O2NewColors.palette.white | O2NewColors.palette.darkModeGrey + let backgroundContainerError = O2NewColors.palette.o2Red10 | O2NewColors.palette.darkModeGrey + let backgroundContainerHover = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.03) | O2NewColors.palette.white.withAlphaComponent(0.03) + let backgroundContainerPressed = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.05) | O2NewColors.palette.white.withAlphaComponent(0.05) let backgroundContainerBrand = MisticaColor.gradient(MisticaGradient( colors: [ @@ -34,258 +37,136 @@ struct O2NewColors: MisticaColors { stops: [0, 0.64, 1], angle: 180 )) - - let backgroundAlternative = O2NewColors.palette.grey20 | O2NewColors.palette.darkModeBlack - - let backgroundBrandSecondary = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBlack - - let backgroundContainer = O2NewColors.palette.white | O2NewColors.palette.darkModeGrey - - let backgroundContainerError = O2NewColors.palette.o2Red10 | O2NewColors.palette.darkModeGrey - - let backgroundContainerHover = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.03) | O2NewColors.palette.white.withAlphaComponent(0.03) - - let backgroundContainerPressed = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.05) | O2NewColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrandHover = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.2) | O2NewColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerBrandPressed = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.4) | O2NewColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrandOverInverse = O2NewColors.palette.beyondBlue70 | O2NewColors.palette.darkModeGrey - let backgroundContainerAlternative = O2NewColors.palette.grey20 | O2NewColors.palette.darkModeGrey - let backgroundOverlay = O2NewColors.palette.black.withAlphaComponent(0.6) | O2NewColors.palette.darkModeGrey.withAlphaComponent(0.8) - let backgroundSkeleton = O2NewColors.palette.grey30 | O2NewColors.palette.darkModeGrey6 - let backgroundSkeletonInverse = O2NewColors.palette.beyondBlue70 | O2NewColors.palette.darkModeGrey6 - + let navigationBarBackground = O2NewColors.palette.darkBlue | O2NewColors.palette.darkModeBlack + let backgroundAlternative = O2NewColors.palette.grey20 | O2NewColors.palette.darkModeBlack let backgroundBrandTop = O2NewColors.palette.darkBlue | O2NewColors.palette.darkModeBlack - let backgroundBrandBottom = O2NewColors.palette.beyondBlue45 | O2NewColors.palette.darkModeBlack - - let appBarBackground = O2NewColors.palette.white | O2NewColors.palette.darkModeGrey - - let navigationBarBackground = O2NewColors.palette.darkBlue | O2NewColors.palette.darkModeBlack - let skeletonWave = O2NewColors.palette.grey30 | O2NewColors.palette.grey80 - let borderLow = O2NewColors.palette.grey20 | O2NewColors.palette.darkModeBlack - let border = O2NewColors.palette.grey30 | O2NewColors.palette.darkModeGrey - let borderHigh = O2NewColors.palette.grey80 | O2NewColors.palette.grey45 - let borderSelected = O2NewColors.palette.beyondBlue | O2NewColors.palette.beyondBlue30 - - let coverBackgroundHover = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.25) - - let coverBackgroundPressed = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.35) - - let buttonDangerBackground = O2NewColors.palette.o2Red60 - - let buttonDangerBackgroundSelected = O2NewColors.palette.o2Red65 - - let buttonDangerBackgroundHover = O2NewColors.palette.o2Red65 - + let coverBackgroundHover = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.25) | O2NewColors.palette.darkModeBlack.withAlphaComponent(0.25) + let coverBackgroundPressed = O2NewColors.palette.darkModeBlack.withAlphaComponent(0.35) | O2NewColors.palette.darkModeBlack.withAlphaComponent(0.35) + let buttonDangerBackground = O2NewColors.palette.o2Red60 | O2NewColors.palette.o2Red60 + let buttonDangerBackgroundSelected = O2NewColors.palette.o2Red65 | O2NewColors.palette.o2Red65 + let buttonDangerBackgroundHover = O2NewColors.palette.o2Red65 | O2NewColors.palette.o2Red65 let buttonLinkDangerBackgroundSelected = O2NewColors.palette.o2Red10 | O2NewColors.palette.white.withAlphaComponent(0.08) - let buttonLinkDangerBackgroundInverse = O2NewColors.palette.white | O2NewColors.palette.white.withAlphaComponent(0) - let buttonLinkDangerBackgroundInverseSelected = O2NewColors.palette.o2Red10 | O2NewColors.palette.white.withAlphaComponent(0.08) - let buttonLinkBackgroundSelected = O2NewColors.palette.beyondBlue10 | O2NewColors.palette.white.withAlphaComponent(0.08) - - let buttonLinkBackgroundInverseSelected = O2NewColors.palette.white.withAlphaComponent(0.08) - + let buttonLinkBackgroundInverseSelected = O2NewColors.palette.white.withAlphaComponent(0.08) | O2NewColors.palette.white.withAlphaComponent(0.08) let buttonPrimaryBackground = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBeyondBlue - let buttonPrimaryBackgroundInverse = O2NewColors.palette.white | O2NewColors.palette.darkModeBeyondBlue - let buttonPrimaryBackgroundSelected = O2NewColors.palette.beyondBlue70 | O2NewColors.palette.beyondBlue55 - let buttonPrimaryBackgroundHover = O2NewColors.palette.beyondBlue70 | O2NewColors.palette.beyondBlue55 - let buttonPrimaryBackgroundInverseSelected = O2NewColors.palette.beyondBlue30 | O2NewColors.palette.beyondBlue55 - let buttonSecondaryBorder = O2NewColors.palette.beyondBlue | O2NewColors.palette.white - let buttonSecondaryBorderSelected = O2NewColors.palette.beyondBlue70 | O2NewColors.palette.white - + let buttonSecondaryBorderInverse = O2NewColors.palette.white | O2NewColors.palette.white let buttonSecondaryBackgroundHover = O2NewColors.palette.beyondBlue10 | O2NewColors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundSelected = O2NewColors.palette.beyondBlue10 | O2NewColors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBorderInverse = O2NewColors.palette.white - let buttonSecondaryBorderInverseSelected = O2NewColors.palette.beyondBlue30 | O2NewColors.palette.white - - let buttonSecondaryBackgroundInverseHover = O2NewColors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBackgroundInverseSelected = O2NewColors.palette.white.withAlphaComponent(0.15) - - let textButtonPrimary = O2NewColors.palette.white - + let buttonSecondaryBackgroundInverseHover = O2NewColors.palette.white.withAlphaComponent(0.15) | O2NewColors.palette.white.withAlphaComponent(0.15) + let buttonSecondaryBackgroundInverseSelected = O2NewColors.palette.white.withAlphaComponent(0.15) | O2NewColors.palette.white.withAlphaComponent(0.15) + let textButtonPrimary = O2NewColors.palette.white | O2NewColors.palette.white let textButtonPrimaryInverse = O2NewColors.palette.beyondBlue | O2NewColors.palette.white - let textButtonPrimaryInverseSelected = O2NewColors.palette.beyondBlue70 | O2NewColors.palette.white - let textButtonSecondary = O2NewColors.palette.beyondBlue | O2NewColors.palette.grey30 - let textButtonSecondarySelected = O2NewColors.palette.beyondBlue70 | O2NewColors.palette.grey30 - let textButtonSecondaryInverse = O2NewColors.palette.white | O2NewColors.palette.grey30 - let textButtonSecondaryInverseSelected = O2NewColors.palette.white | O2NewColors.palette.grey30 - let textLink = O2NewColors.palette.beyondBlue | O2NewColors.palette.beyondBlue40 - let textLinkInverse = O2NewColors.palette.white | O2NewColors.palette.beyondBlue40 - let textLinkDanger = O2NewColors.palette.o2Red65 | O2NewColors.palette.o2Red45 - - let textLinkSnackbar = O2NewColors.palette.beyondBlue30 - + let textLinkSnackbar = O2NewColors.palette.beyondBlue30 | O2NewColors.palette.beyondBlue30 let textActivated = O2NewColors.palette.beyondBlue | O2NewColors.palette.beyondBlue30 - let textBrand = O2NewColors.palette.beyondBlue | O2NewColors.palette.beyondBlue30 - - let control = O2NewColors.palette.grey45 - + let control = O2NewColors.palette.grey45 | O2NewColors.palette.grey45 let controlActivated = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBeyondBlue - let controlInverse = O2NewColors.palette.white | O2NewColors.palette.grey45 - let controlActivatedInverse = O2NewColors.palette.white | O2NewColors.palette.darkModeBeyondBlue - let controlError = O2NewColors.palette.o2Red60 | O2NewColors.palette.o2Red45 - let barTrack = O2NewColors.palette.grey30 | O2NewColors.palette.darkModeGrey6 - let loadingBar = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBeyondBlue - let loadingBarBackground = O2NewColors.palette.grey20 | O2NewColors.palette.darkModeGrey6 - let toggleAndroidInactive = O2NewColors.palette.grey30 | O2NewColors.palette.grey20 - - let toggleAndroidBackgroundActive = O2NewColors.palette.beyondBlue15 - + let toggleAndroidBackgroundActive = O2NewColors.palette.beyondBlue15 | O2NewColors.palette.beyondBlue15 let iosControlKnob = O2NewColors.palette.white | O2NewColors.palette.grey30 - let divider = O2NewColors.palette.grey30 | O2NewColors.palette.white.withAlphaComponent(0.1) - let dividerInverse = O2NewColors.palette.white.withAlphaComponent(0.2) | O2NewColors.palette.white.withAlphaComponent(0.1) - - let navigationBarDivider = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBlack - - let badge = O2NewColors.palette.o2Red65 - - let feedbackErrorBackground = O2NewColors.palette.o2Red60 - + let navigationBarDivider = O2NewColors.palette.darkBlue | O2NewColors.palette.darkModeBlack + let badge = O2NewColors.palette.o2Red65 | O2NewColors.palette.o2Red65 + let feedbackErrorBackground = O2NewColors.palette.o2Red60 | O2NewColors.palette.o2Red60 let feedbackInfoBackground = O2NewColors.palette.black | O2NewColors.palette.darkModeGrey6 - let brand = O2NewColors.palette.beyondBlue | O2NewColors.palette.beyondBlue30 - let brandHigh = O2NewColors.palette.beyondBlue70 | O2NewColors.palette.white.withAlphaComponent(0.05) - let inverse = O2NewColors.palette.white | O2NewColors.palette.grey30 - let neutralHigh = O2NewColors.palette.black | O2NewColors.palette.grey30 - - let neutralMedium = O2NewColors.palette.grey60 - - let neutralMediumInverse = O2NewColors.palette.grey60 - + let neutralMedium = O2NewColors.palette.grey60 | O2NewColors.palette.grey60 + let neutralMediumInverse = O2NewColors.palette.grey60 | O2NewColors.palette.grey60 let neutralLow = O2NewColors.palette.grey20 | O2NewColors.palette.grey80 - let neutralLowAlternative = O2NewColors.palette.grey30 | O2NewColors.palette.grey80 - let textPrimary = O2NewColors.palette.black | O2NewColors.palette.grey30 - let textPrimaryInverse = O2NewColors.palette.white | O2NewColors.palette.grey30 - let textSecondary = O2NewColors.palette.grey60 | O2NewColors.palette.grey45 - let textSecondaryInverse = O2NewColors.palette.beyondBlue10 | O2NewColors.palette.grey45 - - let success = O2NewColors.palette.o2Green - - let warning = O2NewColors.palette.o2Orange - let error = O2NewColors.palette.o2Red65 | O2NewColors.palette.o2Red45 - let textError = O2NewColors.palette.o2Red65 | O2NewColors.palette.o2Red45 - let textErrorInverse = O2NewColors.palette.white | O2NewColors.palette.o2Red45 - - let promo = O2NewColors.palette.o2Pink - + let success = O2NewColors.palette.o2Green | O2NewColors.palette.o2Green + let warning = O2NewColors.palette.o2Orange | O2NewColors.palette.o2Orange + let promo = O2NewColors.palette.o2Pink | O2NewColors.palette.o2Pink let highlight = O2NewColors.palette.o2Pink80 | O2NewColors.palette.o2Pink - let successLow = O2NewColors.palette.o2Green10 | O2NewColors.palette.darkModeGrey6 - let warningLow = O2NewColors.palette.o2Orange10 | O2NewColors.palette.darkModeGrey6 - let errorLow = O2NewColors.palette.o2Red10 | O2NewColors.palette.darkModeGrey6 - let promoLow = O2NewColors.palette.o2Pink15 | O2NewColors.palette.darkModeGrey6 - let brandLow = O2NewColors.palette.beyondBlue10 | O2NewColors.palette.darkModeGrey6 - let successHigh = O2NewColors.palette.o2Green80 | O2NewColors.palette.o2Green40 - let warningHigh = O2NewColors.palette.o2Orange75 | O2NewColors.palette.o2Orange40 - let errorHigh = O2NewColors.palette.o2Red65 | O2NewColors.palette.o2Red40 - let promoHigh = O2NewColors.palette.o2Pink80 | O2NewColors.palette.o2Pink30 - - let successHighInverse = O2NewColors.palette.o2Green80 - - let warningHighInverse = O2NewColors.palette.o2Orange75 - - let errorHighInverse = O2NewColors.palette.o2Red65 - + let successHighInverse = O2NewColors.palette.o2Green80 | O2NewColors.palette.o2Green80 + let warningHighInverse = O2NewColors.palette.o2Orange75 | O2NewColors.palette.o2Orange75 + let errorHighInverse = O2NewColors.palette.o2Red65 | O2NewColors.palette.o2Red65 let promoHighInverse = O2NewColors.palette.o2Pink80 | O2NewColors.palette.o2Pink - let textNavigationBarPrimary = O2NewColors.palette.white | O2NewColors.palette.grey30 - let textNavigationBarSecondary = O2NewColors.palette.beyondBlue30 | O2NewColors.palette.grey45 - let textNavigationSearchBarHint = O2NewColors.palette.beyondBlue30 | O2NewColors.palette.grey45 - let textNavigationSearchBarText = O2NewColors.palette.white | O2NewColors.palette.grey30 - let textAppBar = O2NewColors.palette.grey60 | O2NewColors.palette.grey45 - let textAppBarSelected = O2NewColors.palette.beyondBlue | O2NewColors.palette.beyondBlue40 - let customTabsBackground = O2NewColors.palette.beyondBlue | O2NewColors.palette.darkModeBlack - let tagTextPromo = O2NewColors.palette.o2Pink80 | O2NewColors.palette.o2Pink - let tagTextActive = O2NewColors.palette.beyondBlue | O2NewColors.palette.beyondBlue30 - let tagTextInactive = O2NewColors.palette.grey60 | O2NewColors.palette.grey40 - let tagTextSuccess = O2NewColors.palette.o2Green80 | O2NewColors.palette.o2Green - let tagTextWarning = O2NewColors.palette.o2Orange75 | O2NewColors.palette.o2Orange - let tagTextError = O2NewColors.palette.o2Red65 | O2NewColors.palette.o2Red45 - let tagBackgroundPromo = O2NewColors.palette.o2Pink15 | O2NewColors.palette.darkModeGrey6 - let tagBackgroundActive = O2NewColors.palette.beyondBlue10 | O2NewColors.palette.darkModeGrey6 - let tagBackgroundInactive = O2NewColors.palette.grey20 | O2NewColors.palette.darkModeGrey6 - let tagBackgroundSuccess = O2NewColors.palette.o2Green10 | O2NewColors.palette.darkModeGrey6 - let tagBackgroundWarning = O2NewColors.palette.o2Orange10 | O2NewColors.palette.darkModeGrey6 - let tagBackgroundError = O2NewColors.palette.o2Red10 | O2NewColors.palette.darkModeGrey6 + let cardContentOverlay = MisticaColor.gradient(MisticaGradient( + colors: + [ + O2NewColors.palette.beyondBlue.withAlphaComponent(0) | O2NewColors.palette.black.withAlphaComponent(0), + O2NewColors.palette.beyondBlue.withAlphaComponent(0.4) | O2NewColors.palette.black.withAlphaComponent(0.4), + O2NewColors.palette.beyondBlue.withAlphaComponent(1) | O2NewColors.palette.black.withAlphaComponent(0.7) + ], + stops: [0, 0.3, 1], + angle: 180 + )) } public struct O2NewColorPalette { diff --git a/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift b/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift index 4d2d81cb..742b544d 100644 --- a/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift +++ b/Sources/MisticaCommon/Colors/TelefonicaColorPalette.swift @@ -10,264 +10,145 @@ import UIKit struct TelefonicaColors: MisticaColors { static let palette = TelefonicaColorPalette() - + let backgroundBrand = MisticaColor.solid(TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack) + let backgroundBrandSecondary = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack let appBarBackground = TelefonicaColors.palette.white | TelefonicaColors.palette.darkModeGrey - let background = TelefonicaColors.palette.white | TelefonicaColors.palette.darkModeBlack - let backgroundContainer = TelefonicaColors.palette.white | TelefonicaColors.palette.darkModeGrey - let backgroundContainerError = TelefonicaColors.palette.coral10 | TelefonicaColors.palette.darkModeGrey - let backgroundContainerHover = TelefonicaColors.palette.telefonicaBlue.withAlphaComponent(0.03) | TelefonicaColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerPressed = TelefonicaColors.palette.telefonicaBlue.withAlphaComponent(0.05) | TelefonicaColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = MisticaColor.solid(TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeGrey) - let backgroundContainerBrandHover = TelefonicaColors.palette.darkModeBlack.withAlphaComponent(0.2) | TelefonicaColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerBrandPressed = TelefonicaColors.palette.darkModeBlack.withAlphaComponent(0.4) | TelefonicaColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrandOverInverse = TelefonicaColors.palette.telefonicaBlue70 | TelefonicaColors.palette.darkModeGrey - let backgroundContainerAlternative = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.darkModeGrey - - let backgroundBrand = MisticaColor.solid(TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack) - - let backgroundBrandSecondary = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack - let backgroundOverlay = TelefonicaColors.palette.grey6.withAlphaComponent(0.8) | TelefonicaColors.palette.darkModeGrey.withAlphaComponent(0.8) - let backgroundSkeleton = TelefonicaColors.palette.grey2 | TelefonicaColors.palette.grey6 - let backgroundSkeletonInverse = TelefonicaColors.palette.telefonicaBlue70 | TelefonicaColors.palette.grey6 - let navigationBarBackground = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack - let backgroundAlternative = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.darkModeBlack - let backgroundBrandTop = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack - let backgroundBrandBottom = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack - let skeletonWave = TelefonicaColors.palette.grey2 | TelefonicaColors.palette.grey5 - let borderLow = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.darkModeBlack - let border = TelefonicaColors.palette.grey2 | TelefonicaColors.palette.darkModeGrey - - let borderHigh = TelefonicaColors.palette.grey5 - - let borderSelected = TelefonicaColors.palette.telefonicaBlue - - let coverBackgroundHover = TelefonicaColors.palette.darkModeBlack.withAlphaComponent(0.25) - - let coverBackgroundPressed = TelefonicaColors.palette.darkModeBlack.withAlphaComponent(0.35) - - let buttonDangerBackground = TelefonicaColors.palette.coral - - let buttonDangerBackgroundSelected = TelefonicaColors.palette.coral80 - - let buttonDangerBackgroundHover = TelefonicaColors.palette.coral80 - + let borderHigh = TelefonicaColors.palette.grey5 | TelefonicaColors.palette.grey5 + let borderSelected = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.telefonicaBlue + let coverBackgroundHover = TelefonicaColors.palette.darkModeBlack.withAlphaComponent(0.25) | TelefonicaColors.palette.darkModeBlack.withAlphaComponent(0.25) + let coverBackgroundPressed = TelefonicaColors.palette.darkModeBlack.withAlphaComponent(0.35) | TelefonicaColors.palette.darkModeBlack.withAlphaComponent(0.35) + let buttonDangerBackground = TelefonicaColors.palette.coral | TelefonicaColors.palette.coral + let buttonDangerBackgroundSelected = TelefonicaColors.palette.coral80 | TelefonicaColors.palette.coral80 + let buttonDangerBackgroundHover = TelefonicaColors.palette.coral80 | TelefonicaColors.palette.coral80 let buttonLinkDangerBackgroundSelected = TelefonicaColors.palette.coral10 | TelefonicaColors.palette.white.withAlphaComponent(0.08) - let buttonLinkDangerBackgroundInverse = TelefonicaColors.palette.white | TelefonicaColors.palette.white.withAlphaComponent(0) - let buttonLinkDangerBackgroundInverseSelected = TelefonicaColors.palette.coral10 | TelefonicaColors.palette.white.withAlphaComponent(0.08) - let buttonLinkBackgroundSelected = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.white.withAlphaComponent(0.08) - - let buttonLinkBackgroundInverseSelected = TelefonicaColors.palette.white.withAlphaComponent(0.08) - - let buttonPrimaryBackground = TelefonicaColors.palette.telefonicaBlue - + let buttonLinkBackgroundInverseSelected = TelefonicaColors.palette.white.withAlphaComponent(0.08) | TelefonicaColors.palette.white.withAlphaComponent(0.08) + let buttonPrimaryBackground = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.telefonicaBlue let buttonPrimaryBackgroundInverse = TelefonicaColors.palette.white | TelefonicaColors.palette.telefonicaBlue - - let buttonPrimaryBackgroundSelected = TelefonicaColors.palette.telefonicaBlue70 - - let buttonPrimaryBackgroundHover = TelefonicaColors.palette.telefonicaBlue70 - + let buttonPrimaryBackgroundSelected = TelefonicaColors.palette.telefonicaBlue70 | TelefonicaColors.palette.telefonicaBlue70 + let buttonPrimaryBackgroundHover = TelefonicaColors.palette.telefonicaBlue70 | TelefonicaColors.palette.telefonicaBlue70 let buttonPrimaryBackgroundInverseSelected = TelefonicaColors.palette.telefonicaBlue30 | TelefonicaColors.palette.telefonicaBlue70 - let buttonSecondaryBorder = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.white - let buttonSecondaryBorderSelected = TelefonicaColors.palette.telefonicaBlue70 | TelefonicaColors.palette.white - + let buttonSecondaryBorderInverse = TelefonicaColors.palette.white | TelefonicaColors.palette.white let buttonSecondaryBackgroundHover = TelefonicaColors.palette.telefonicaBlue10 | TelefonicaColors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundSelected = TelefonicaColors.palette.telefonicaBlue10 | TelefonicaColors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBorderInverse = TelefonicaColors.palette.white - - let buttonSecondaryBorderInverseSelected = TelefonicaColors.palette.white - + let buttonSecondaryBorderInverseSelected = TelefonicaColors.palette.white | TelefonicaColors.palette.white let buttonSecondaryBackgroundInverseHover = TelefonicaColors.palette.white.withAlphaComponent(0.1) | TelefonicaColors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundInverseSelected = TelefonicaColors.palette.white.withAlphaComponent(0.1) | TelefonicaColors.palette.white.withAlphaComponent(0.15) - let textButtonPrimary = TelefonicaColors.palette.white | TelefonicaColors.palette.grey2 - let textButtonPrimaryInverse = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.grey2 - let textButtonPrimaryInverseSelected = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.grey2 - let textButtonSecondary = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.grey2 - let textButtonSecondarySelected = TelefonicaColors.palette.telefonicaBlue70 | TelefonicaColors.palette.grey2 - let textButtonSecondaryInverse = TelefonicaColors.palette.white | TelefonicaColors.palette.grey2 - let textButtonSecondaryInverseSelected = TelefonicaColors.palette.white | TelefonicaColors.palette.grey2 - - let textLink = TelefonicaColors.palette.telefonicaBlue - + let textLink = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.telefonicaBlue let textLinkInverse = TelefonicaColors.palette.white | TelefonicaColors.palette.telefonicaBlue - - let textLinkDanger = TelefonicaColors.palette.coral - - let textLinkSnackbar = TelefonicaColors.palette.telefonicaBlue30 - - let textActivated = TelefonicaColors.palette.telefonicaBlue - - let textBrand = TelefonicaColors.palette.telefonicaBlue - + let textLinkDanger = TelefonicaColors.palette.coral | TelefonicaColors.palette.coral + let textLinkSnackbar = TelefonicaColors.palette.telefonicaBlue30 | TelefonicaColors.palette.telefonicaBlue30 + let textActivated = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.telefonicaBlue + let textBrand = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.telefonicaBlue let control = TelefonicaColors.palette.grey3 | TelefonicaColors.palette.darkModeGrey6 - - let controlActivated = TelefonicaColors.palette.telefonicaBlue - + let controlActivated = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.telefonicaBlue let controlInverse = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.darkModeGrey6 - let controlActivatedInverse = TelefonicaColors.palette.white | TelefonicaColors.palette.telefonicaBlue - - let controlError = TelefonicaColors.palette.coral - + let controlError = TelefonicaColors.palette.coral | TelefonicaColors.palette.coral let barTrack = TelefonicaColors.palette.grey3 | TelefonicaColors.palette.darkModeGrey6 - let loadingBar = TelefonicaColors.palette.telefonicaBlue30 | TelefonicaColors.palette.telefonicaBlue - let loadingBarBackground = TelefonicaColors.palette.telefonicaBlue70 | TelefonicaColors.palette.grey6 - let toggleAndroidInactive = TelefonicaColors.palette.grey2 | TelefonicaColors.palette.grey4 - let toggleAndroidBackgroundActive = TelefonicaColors.palette.grey2 | TelefonicaColors.palette.telefonicaBlue20 - let iosControlKnob = TelefonicaColors.palette.white | TelefonicaColors.palette.grey2 - let divider = TelefonicaColors.palette.grey2 | TelefonicaColors.palette.white.withAlphaComponent(0.05) - let dividerInverse = TelefonicaColors.palette.white.withAlphaComponent(0.2) | TelefonicaColors.palette.white.withAlphaComponent(0.05) - let navigationBarDivider = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack - - let badge = TelefonicaColors.palette.coral70 - - let feedbackErrorBackground = TelefonicaColors.palette.coral - + let badge = TelefonicaColors.palette.coral70 | TelefonicaColors.palette.coral70 + let feedbackErrorBackground = TelefonicaColors.palette.coral | TelefonicaColors.palette.coral let feedbackInfoBackground = TelefonicaColors.palette.grey9 | TelefonicaColors.palette.grey8 - - let brand = TelefonicaColors.palette.telefonicaBlue - + let brand = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.telefonicaBlue let brandHigh = TelefonicaColors.palette.telefonicaBlue70 | TelefonicaColors.palette.white.withAlphaComponent(0.05) - let inverse = TelefonicaColors.palette.white | TelefonicaColors.palette.grey2 - let neutralHigh = TelefonicaColors.palette.grey9 | TelefonicaColors.palette.grey2 - - let neutralMedium = TelefonicaColors.palette.grey5 - - let neutralMediumInverse = TelefonicaColors.palette.grey5 - + let neutralMedium = TelefonicaColors.palette.grey5 | TelefonicaColors.palette.grey5 + let neutralMediumInverse = TelefonicaColors.palette.grey5 | TelefonicaColors.palette.grey5 let neutralLow = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.darkModeGrey6 - let neutralLowAlternative = TelefonicaColors.palette.grey2 | TelefonicaColors.palette.darkModeGrey6 - let textPrimary = TelefonicaColors.palette.grey9 | TelefonicaColors.palette.grey2 - let textPrimaryInverse = TelefonicaColors.palette.white | TelefonicaColors.palette.grey2 - let textSecondary = TelefonicaColors.palette.grey5 | TelefonicaColors.palette.grey4 - let textSecondaryInverse = TelefonicaColors.palette.telefonicaBlue10 | TelefonicaColors.palette.grey4 - - let error = TelefonicaColors.palette.coral - - let textError = TelefonicaColors.palette.coral - + let error = TelefonicaColors.palette.coral | TelefonicaColors.palette.coral + let textError = TelefonicaColors.palette.coral | TelefonicaColors.palette.coral let textErrorInverse = TelefonicaColors.palette.white | TelefonicaColors.palette.coral - - let success = TelefonicaColors.palette.turquoise - - let warning = TelefonicaColors.palette.ambar - - let promo = TelefonicaColors.palette.orchid - - let highlight = TelefonicaColors.palette.coral40 - + let success = TelefonicaColors.palette.turquoise | TelefonicaColors.palette.turquoise + let warning = TelefonicaColors.palette.ambar | TelefonicaColors.palette.ambar + let promo = TelefonicaColors.palette.orchid | TelefonicaColors.palette.orchid + let highlight = TelefonicaColors.palette.coral40 | TelefonicaColors.palette.coral40 let successLow = TelefonicaColors.palette.turquoise10 | TelefonicaColors.palette.darkModeGrey6 - let warningLow = TelefonicaColors.palette.ambar10 | TelefonicaColors.palette.darkModeGrey6 - let errorLow = TelefonicaColors.palette.coral10 | TelefonicaColors.palette.darkModeGrey6 - let promoLow = TelefonicaColors.palette.orchid10 | TelefonicaColors.palette.darkModeGrey6 - let brandLow = TelefonicaColors.palette.telefonicaBlue10 | TelefonicaColors.palette.darkModeGrey6 - let successHigh = TelefonicaColors.palette.turquoise70 | TelefonicaColors.palette.turquoise40 - let warningHigh = TelefonicaColors.palette.ambar70 | TelefonicaColors.palette.ambar40 - let errorHigh = TelefonicaColors.palette.coral70 | TelefonicaColors.palette.coral40 - let promoHigh = TelefonicaColors.palette.orchid70 | TelefonicaColors.palette.orchid40 - - let successHighInverse = TelefonicaColors.palette.turquoise70 - - let warningHighInverse = TelefonicaColors.palette.ambar70 - - let errorHighInverse = TelefonicaColors.palette.coral70 - - let promoHighInverse = TelefonicaColors.palette.orchid70 - + let successHighInverse = TelefonicaColors.palette.turquoise70 | TelefonicaColors.palette.turquoise70 + let warningHighInverse = TelefonicaColors.palette.ambar70 | TelefonicaColors.palette.ambar70 + let errorHighInverse = TelefonicaColors.palette.coral70 | TelefonicaColors.palette.coral70 + let promoHighInverse = TelefonicaColors.palette.orchid70 | TelefonicaColors.palette.orchid70 let textNavigationBarPrimary = TelefonicaColors.palette.white | TelefonicaColors.palette.grey2 - let textNavigationBarSecondary = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.grey4 - let textNavigationSearchBarHint = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.grey4 - let textNavigationSearchBarText = TelefonicaColors.palette.white | TelefonicaColors.palette.grey2 - let textAppBar = TelefonicaColors.palette.grey4 | TelefonicaColors.palette.grey5 - let textAppBarSelected = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.grey2 - let customTabsBackground = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.darkModeBlack - let tagTextPromo = TelefonicaColors.palette.orchid70 | TelefonicaColors.palette.orchid40 - - let tagTextActive = TelefonicaColors.palette.telefonicaBlue - - let tagTextInactive = TelefonicaColors.palette.grey5 - + let tagTextActive = TelefonicaColors.palette.telefonicaBlue | TelefonicaColors.palette.telefonicaBlue + let tagTextInactive = TelefonicaColors.palette.grey5 | TelefonicaColors.palette.grey5 let tagTextSuccess = TelefonicaColors.palette.turquoise70 | TelefonicaColors.palette.turquoise40 - let tagTextWarning = TelefonicaColors.palette.ambar70 | TelefonicaColors.palette.ambar40 - let tagTextError = TelefonicaColors.palette.coral70 | TelefonicaColors.palette.coral40 - let tagBackgroundPromo = TelefonicaColors.palette.orchid10 | TelefonicaColors.palette.darkModeGrey6 - let tagBackgroundActive = TelefonicaColors.palette.telefonicaBlue10 | TelefonicaColors.palette.darkModeGrey6 - let tagBackgroundInactive = TelefonicaColors.palette.grey1 | TelefonicaColors.palette.darkModeGrey6 - let tagBackgroundSuccess = TelefonicaColors.palette.turquoise10 | TelefonicaColors.palette.darkModeGrey6 - let tagBackgroundWarning = TelefonicaColors.palette.ambar10 | TelefonicaColors.palette.darkModeGrey6 - let tagBackgroundError = TelefonicaColors.palette.coral10 | TelefonicaColors.palette.darkModeGrey6 + let cardContentOverlay = MisticaColor.gradient(MisticaGradient( + colors: + [ + TelefonicaColors.palette.black.withAlphaComponent(0) | TelefonicaColors.palette.black.withAlphaComponent(0), + TelefonicaColors.palette.black.withAlphaComponent(0.4) | TelefonicaColors.palette.black.withAlphaComponent(0.4), + TelefonicaColors.palette.black.withAlphaComponent(0.7) | TelefonicaColors.palette.black.withAlphaComponent(0.7) + ], + stops: [0, 0.3, 1], + angle: 180 + )) } public struct TelefonicaColorPalette { diff --git a/Sources/MisticaCommon/Colors/TuColorPalette.swift b/Sources/MisticaCommon/Colors/TuColorPalette.swift index 714fb35b..0699d5e8 100644 --- a/Sources/MisticaCommon/Colors/TuColorPalette.swift +++ b/Sources/MisticaCommon/Colors/TuColorPalette.swift @@ -10,264 +10,145 @@ import UIKit struct TuColors: MisticaColors { static let palette = TuColorPalette() - + let backgroundBrand = MisticaColor.solid(TuColors.palette.primary | TuColors.palette.darkModeBlack) + let backgroundBrandSecondary = TuColors.palette.blue | TuColors.palette.darkModeBlack let appBarBackground = TuColors.palette.white | TuColors.palette.darkModeGrey - let background = TuColors.palette.white | TuColors.palette.darkModeBlack - let backgroundContainer = TuColors.palette.white | TuColors.palette.darkModeGrey - let backgroundContainerError = TuColors.palette.red10 | TuColors.palette.darkModeGrey - let backgroundContainerHover = TuColors.palette.grey9.withAlphaComponent(0.03) | TuColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerPressed = TuColors.palette.grey9.withAlphaComponent(0.05) | TuColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = MisticaColor.solid(TuColors.palette.primary | TuColors.palette.darkModeGrey) - let backgroundContainerBrandHover = TuColors.palette.grey9.withAlphaComponent(0.2) | TuColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerBrandPressed = TuColors.palette.grey9.withAlphaComponent(0.4) | TuColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrandOverInverse = TuColors.palette.primary80 | TuColors.palette.darkModeGrey - let backgroundContainerAlternative = TuColors.palette.grey1 | TuColors.palette.darkModeGrey - - let backgroundBrand = MisticaColor.solid(TuColors.palette.primary | TuColors.palette.darkModeBlack) - - let backgroundBrandSecondary = TuColors.palette.blue | TuColors.palette.darkModeBlack - let backgroundOverlay = TuColors.palette.primary.withAlphaComponent(0.8) | TuColors.palette.darkModeGrey.withAlphaComponent(0.8) - let backgroundSkeleton = TuColors.palette.grey2 | TuColors.palette.darkModeGrey6 - let backgroundSkeletonInverse = TuColors.palette.primary65 | TuColors.palette.darkModeGrey6 - let navigationBarBackground = TuColors.palette.primary | TuColors.palette.darkModeBlack - let backgroundAlternative = TuColors.palette.grey1 | TuColors.palette.darkModeBlack - let backgroundBrandTop = TuColors.palette.primary | TuColors.palette.darkModeBlack - let backgroundBrandBottom = TuColors.palette.primary | TuColors.palette.darkModeBlack - let skeletonWave = TuColors.palette.grey2 | TuColors.palette.grey5 - let borderLow = TuColors.palette.grey1 | TuColors.palette.darkModeBlack - let border = TuColors.palette.grey2 | TuColors.palette.darkModeGrey - - let borderHigh = TuColors.palette.grey5 - + let borderHigh = TuColors.palette.grey5 | TuColors.palette.grey5 let borderSelected = TuColors.palette.blue | TuColors.palette.blue30 - let coverBackgroundHover = TuColors.palette.grey9.withAlphaComponent(0.25) | TuColors.palette.darkModeBlack.withAlphaComponent(0.25) - let coverBackgroundPressed = TuColors.palette.grey9.withAlphaComponent(0.35) | TuColors.palette.darkModeBlack.withAlphaComponent(0.35) - - let buttonDangerBackground = TuColors.palette.red - + let buttonDangerBackground = TuColors.palette.red | TuColors.palette.red let buttonDangerBackgroundSelected = TuColors.palette.red55 | TuColors.palette.red80 - let buttonDangerBackgroundHover = TuColors.palette.red55 | TuColors.palette.red80 - - let buttonLinkDangerBackgroundSelected = TuColors.palette.red10 - + let buttonLinkDangerBackgroundSelected = TuColors.palette.red10 | TuColors.palette.red10 let buttonLinkDangerBackgroundInverse = TuColors.palette.white | TuColors.palette.white.withAlphaComponent(0) - - let buttonLinkDangerBackgroundInverseSelected = TuColors.palette.red10 - + let buttonLinkDangerBackgroundInverseSelected = TuColors.palette.red10 | TuColors.palette.red10 let buttonLinkBackgroundSelected = TuColors.palette.blue10 | TuColors.palette.white.withAlphaComponent(0.08) - - let buttonLinkBackgroundInverseSelected = TuColors.palette.white.withAlphaComponent(0.08) - + let buttonLinkBackgroundInverseSelected = TuColors.palette.white.withAlphaComponent(0.08) | TuColors.palette.white.withAlphaComponent(0.08) let buttonPrimaryBackground = TuColors.palette.primary | TuColors.palette.grey2 - let buttonPrimaryBackgroundInverse = TuColors.palette.white | TuColors.palette.grey2 - let buttonPrimaryBackgroundSelected = TuColors.palette.primary45 | TuColors.palette.grey3 - let buttonPrimaryBackgroundHover = TuColors.palette.primary45 | TuColors.palette.grey3 - let buttonPrimaryBackgroundInverseSelected = TuColors.palette.white.withAlphaComponent(0.8) | TuColors.palette.grey3 - let buttonSecondaryBorder = TuColors.palette.blue | TuColors.palette.grey2 - let buttonSecondaryBorderSelected = TuColors.palette.blue70 | TuColors.palette.grey2 - + let buttonSecondaryBorderInverse = TuColors.palette.white | TuColors.palette.grey2 let buttonSecondaryBackgroundHover = TuColors.palette.blue10 | TuColors.palette.grey2.withAlphaComponent(0.15) - let buttonSecondaryBackgroundSelected = TuColors.palette.blue10 | TuColors.palette.grey2.withAlphaComponent(0.15) - - let buttonSecondaryBorderInverse = TuColors.palette.white | TuColors.palette.grey2 - let buttonSecondaryBorderInverseSelected = TuColors.palette.white | TuColors.palette.grey2 - let buttonSecondaryBackgroundInverseHover = TuColors.palette.white.withAlphaComponent(0.1) | TuColors.palette.grey2.withAlphaComponent(0.15) - let buttonSecondaryBackgroundInverseSelected = TuColors.palette.white.withAlphaComponent(0.1) | TuColors.palette.grey2.withAlphaComponent(0.15) - let textButtonPrimary = TuColors.palette.white | TuColors.palette.primary - - let textButtonPrimaryInverse = TuColors.palette.primary - - let textButtonPrimaryInverseSelected = TuColors.palette.primary - + let textButtonPrimaryInverse = TuColors.palette.primary | TuColors.palette.primary + let textButtonPrimaryInverseSelected = TuColors.palette.primary | TuColors.palette.primary let textButtonSecondary = TuColors.palette.blue | TuColors.palette.grey2 - let textButtonSecondarySelected = TuColors.palette.blue70 | TuColors.palette.grey2 - let textButtonSecondaryInverse = TuColors.palette.white | TuColors.palette.grey2 - let textButtonSecondaryInverseSelected = TuColors.palette.white | TuColors.palette.grey2 - let textLink = TuColors.palette.blue | TuColors.palette.blue30 - let textLinkInverse = TuColors.palette.white | TuColors.palette.blue30 - - let textLinkDanger = TuColors.palette.red - + let textLinkDanger = TuColors.palette.red | TuColors.palette.red let textLinkSnackbar = TuColors.palette.white | TuColors.palette.blue30 - let textActivated = TuColors.palette.primary | TuColors.palette.blue30 - let textBrand = TuColors.palette.blue | TuColors.palette.blue30 - let control = TuColors.palette.grey5 | TuColors.palette.darkModeGrey6 - let controlActivated = TuColors.palette.primary | TuColors.palette.blue30 - let controlInverse = TuColors.palette.white | TuColors.palette.darkModeGrey6 - let controlActivatedInverse = TuColors.palette.white | TuColors.palette.blue30 - - let controlError = TuColors.palette.red - + let controlError = TuColors.palette.red | TuColors.palette.red let barTrack = TuColors.palette.grey2 | TuColors.palette.darkModeGrey6 - - let loadingBar = TuColors.palette.green40 - - let loadingBarBackground = TuColors.palette.green - + let loadingBar = TuColors.palette.green40 | TuColors.palette.green40 + let loadingBarBackground = TuColors.palette.green | TuColors.palette.green let toggleAndroidInactive = TuColors.palette.grey2 | TuColors.palette.grey4 - let toggleAndroidBackgroundActive = TuColors.palette.primary15 | TuColors.palette.blue20 - let iosControlKnob = TuColors.palette.white | TuColors.palette.grey2 - let divider = TuColors.palette.grey2 | TuColors.palette.white.withAlphaComponent(0.05) - let dividerInverse = TuColors.palette.white.withAlphaComponent(0.2) | TuColors.palette.white.withAlphaComponent(0.05) - let navigationBarDivider = TuColors.palette.primary | TuColors.palette.darkModeBlack - let badge = TuColors.palette.blue | TuColors.palette.blue30 - - let feedbackErrorBackground = TuColors.palette.red - + let feedbackErrorBackground = TuColors.palette.red | TuColors.palette.red let feedbackInfoBackground = TuColors.palette.primary | TuColors.palette.darkModeGrey - let brand = TuColors.palette.blue | TuColors.palette.blue30 - let brandHigh = TuColors.palette.blue70 | TuColors.palette.white.withAlphaComponent(0.05) - let inverse = TuColors.palette.white | TuColors.palette.grey2 - let neutralHigh = TuColors.palette.grey9 | TuColors.palette.grey2 - - let neutralMedium = TuColors.palette.grey5 - - let neutralMediumInverse = TuColors.palette.grey5 - + let neutralMedium = TuColors.palette.grey5 | TuColors.palette.grey5 + let neutralMediumInverse = TuColors.palette.grey5 | TuColors.palette.grey5 let neutralLow = TuColors.palette.grey1 | TuColors.palette.darkModeGrey6 - let neutralLowAlternative = TuColors.palette.grey2 | TuColors.palette.darkModeGrey6 - let textPrimary = TuColors.palette.grey9 | TuColors.palette.grey2 - let textPrimaryInverse = TuColors.palette.white | TuColors.palette.grey2 - let textSecondary = TuColors.palette.grey6 | TuColors.palette.grey4 - let textSecondaryInverse = TuColors.palette.grey3 | TuColors.palette.grey4 - - let error = TuColors.palette.red - - let textError = TuColors.palette.red - + let error = TuColors.palette.red | TuColors.palette.red + let textError = TuColors.palette.red | TuColors.palette.red let textErrorInverse = TuColors.palette.white | TuColors.palette.red - - let success = TuColors.palette.green - - let warning = TuColors.palette.orange - - let promo = TuColors.palette.blue - - let highlight = TuColors.palette.red40 - + let success = TuColors.palette.green | TuColors.palette.green + let warning = TuColors.palette.orange | TuColors.palette.orange + let promo = TuColors.palette.blue | TuColors.palette.blue + let highlight = TuColors.palette.red40 | TuColors.palette.red40 let successLow = TuColors.palette.green10 | TuColors.palette.darkModeGrey6 - let warningLow = TuColors.palette.orange20 | TuColors.palette.darkModeGrey6 - let errorLow = TuColors.palette.red10 | TuColors.palette.darkModeGrey6 - let promoLow = TuColors.palette.blue10 | TuColors.palette.darkModeGrey6 - let brandLow = TuColors.palette.blue10 | TuColors.palette.darkModeGrey6 - let successHigh = TuColors.palette.green75 | TuColors.palette.green40 - let warningHigh = TuColors.palette.orange70 | TuColors.palette.orange55 - let errorHigh = TuColors.palette.red70 | TuColors.palette.red40 - let promoHigh = TuColors.palette.blue | TuColors.palette.blue30 - - let successHighInverse = TuColors.palette.green75 - - let warningHighInverse = TuColors.palette.orange70 - - let errorHighInverse = TuColors.palette.red70 - + let successHighInverse = TuColors.palette.green75 | TuColors.palette.green75 + let warningHighInverse = TuColors.palette.orange70 | TuColors.palette.orange70 + let errorHighInverse = TuColors.palette.red70 | TuColors.palette.red70 let promoHighInverse = TuColors.palette.blue | TuColors.palette.blue70 - let textNavigationBarPrimary = TuColors.palette.white | TuColors.palette.grey2 - let textNavigationBarSecondary = TuColors.palette.grey1 | TuColors.palette.grey4 - let textNavigationSearchBarHint = TuColors.palette.grey1 | TuColors.palette.grey4 - let textNavigationSearchBarText = TuColors.palette.white | TuColors.palette.grey2 - let textAppBar = TuColors.palette.grey6 | TuColors.palette.grey5 - let textAppBarSelected = TuColors.palette.primary | TuColors.palette.grey2 - let customTabsBackground = TuColors.palette.white | TuColors.palette.darkModeBlack - let tagTextPromo = TuColors.palette.blue | TuColors.palette.blue30 - let tagTextActive = TuColors.palette.blue | TuColors.palette.blue30 - - let tagTextInactive = TuColors.palette.grey5 - + let tagTextInactive = TuColors.palette.grey5 | TuColors.palette.grey5 let tagTextSuccess = TuColors.palette.green75 | TuColors.palette.green40 - let tagTextWarning = TuColors.palette.orange70 | TuColors.palette.orange55 - let tagTextError = TuColors.palette.red70 | TuColors.palette.red40 - let tagBackgroundPromo = TuColors.palette.blue10 | TuColors.palette.darkModeGrey6 - let tagBackgroundActive = TuColors.palette.blue10 | TuColors.palette.darkModeGrey6 - let tagBackgroundInactive = TuColors.palette.grey1 | TuColors.palette.darkModeGrey6 - let tagBackgroundSuccess = TuColors.palette.green10 | TuColors.palette.darkModeGrey6 - let tagBackgroundWarning = TuColors.palette.orange20 | TuColors.palette.darkModeGrey6 - let tagBackgroundError = TuColors.palette.red10 | TuColors.palette.darkModeGrey6 + let cardContentOverlay = MisticaColor.gradient(MisticaGradient( + colors: + [ + TuColors.palette.black.withAlphaComponent(0) | TuColors.palette.black.withAlphaComponent(0), + TuColors.palette.black.withAlphaComponent(0.4) | TuColors.palette.black.withAlphaComponent(0.4), + TuColors.palette.black.withAlphaComponent(0.7) | TuColors.palette.black.withAlphaComponent(0.7) + ], + stops: [0, 0.3, 1], + angle: 180 + )) } public struct TuColorPalette { diff --git a/Sources/MisticaCommon/Colors/VivoColorPalette.swift b/Sources/MisticaCommon/Colors/VivoColorPalette.swift index 76ed0ebd..0e3f8010 100644 --- a/Sources/MisticaCommon/Colors/VivoColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoColorPalette.swift @@ -10,264 +10,145 @@ import UIKit struct VivoColors: MisticaColors { static let palette = VivoColorPalette() - - let background = VivoColors.palette.white | VivoColors.palette.darkModeBlack - - let backgroundAlternative = VivoColors.palette.grey1 | VivoColors.palette.darkModeBlack - let backgroundBrand = MisticaColor.solid(VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack) - let backgroundBrandSecondary = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack - + let appBarBackground = VivoColors.palette.white | VivoColors.palette.darkModeGrey + let background = VivoColors.palette.white | VivoColors.palette.darkModeBlack let backgroundContainer = VivoColors.palette.white | VivoColors.palette.darkModeGrey - let backgroundContainerError = VivoColors.palette.pepperLight10 | VivoColors.palette.darkModeGrey - let backgroundContainerHover = VivoColors.palette.darkModeBlack.withAlphaComponent(0.03) | VivoColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerPressed = VivoColors.palette.darkModeBlack.withAlphaComponent(0.05) | VivoColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = MisticaColor.solid(VivoColors.palette.vivoPurple | VivoColors.palette.darkModeGrey) - let backgroundContainerBrandHover = VivoColors.palette.darkModeBlack.withAlphaComponent(0.2) | VivoColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerBrandPressed = VivoColors.palette.darkModeBlack.withAlphaComponent(0.4) | VivoColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrandOverInverse = VivoColors.palette.vivoPurpleDark | VivoColors.palette.darkModeGrey - let backgroundContainerAlternative = VivoColors.palette.grey1 | VivoColors.palette.darkModeGrey - let backgroundOverlay = VivoColors.palette.grey6.withAlphaComponent(0.6) | VivoColors.palette.darkModeGrey.withAlphaComponent(0.8) - let backgroundSkeleton = VivoColors.palette.grey2 | VivoColors.palette.darkModeGrey6 - let backgroundSkeletonInverse = VivoColors.palette.vivoPurpleDark | VivoColors.palette.darkModeGrey6 - + let navigationBarBackground = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack + let backgroundAlternative = VivoColors.palette.grey1 | VivoColors.palette.darkModeBlack let backgroundBrandTop = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack - let backgroundBrandBottom = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack - - let appBarBackground = VivoColors.palette.white | VivoColors.palette.darkModeGrey - - let navigationBarBackground = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack - let skeletonWave = VivoColors.palette.grey2 | VivoColors.palette.grey5 - let borderLow = VivoColors.palette.grey1 | VivoColors.palette.darkModeBlack - let border = VivoColors.palette.grey3 | VivoColors.palette.darkModeGrey - - let borderHigh = VivoColors.palette.grey5 - - let borderSelected = VivoColors.palette.vivoPurple - - let coverBackgroundHover = VivoColors.palette.darkModeBlack.withAlphaComponent(0.25) - - let coverBackgroundPressed = VivoColors.palette.darkModeBlack.withAlphaComponent(0.35) - - let buttonDangerBackground = VivoColors.palette.pepper - - let buttonDangerBackgroundSelected = VivoColors.palette.pepperDark - - let buttonDangerBackgroundHover = VivoColors.palette.pepperDark - + let borderHigh = VivoColors.palette.grey5 | VivoColors.palette.grey5 + let borderSelected = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurple + let coverBackgroundHover = VivoColors.palette.darkModeBlack.withAlphaComponent(0.25) | VivoColors.palette.darkModeBlack.withAlphaComponent(0.25) + let coverBackgroundPressed = VivoColors.palette.darkModeBlack.withAlphaComponent(0.35) | VivoColors.palette.darkModeBlack.withAlphaComponent(0.35) + let buttonDangerBackground = VivoColors.palette.pepper | VivoColors.palette.pepper + let buttonDangerBackgroundSelected = VivoColors.palette.pepperDark | VivoColors.palette.pepperDark + let buttonDangerBackgroundHover = VivoColors.palette.pepperDark | VivoColors.palette.pepperDark let buttonLinkDangerBackgroundSelected = VivoColors.palette.pepperLight10 | VivoColors.palette.white.withAlphaComponent(0.08) - let buttonLinkDangerBackgroundInverse = VivoColors.palette.white | VivoColors.palette.white.withAlphaComponent(0) - let buttonLinkDangerBackgroundInverseSelected = VivoColors.palette.pepperLight10 | VivoColors.palette.white.withAlphaComponent(0.08) - let buttonLinkBackgroundSelected = VivoColors.palette.vivoPurpleLight10 | VivoColors.palette.white.withAlphaComponent(0.08) - let buttonLinkBackgroundInverseSelected = VivoColors.palette.white.withAlphaComponent(0.1) | VivoColors.palette.white.withAlphaComponent(0.08) - let buttonPrimaryBackground = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight80 - let buttonPrimaryBackgroundInverse = VivoColors.palette.white | VivoColors.palette.vivoPurpleLight80 - - let buttonPrimaryBackgroundSelected = VivoColors.palette.vivoPurpleDark - - let buttonPrimaryBackgroundHover = VivoColors.palette.vivoPurpleDark - + let buttonPrimaryBackgroundSelected = VivoColors.palette.vivoPurpleDark | VivoColors.palette.vivoPurpleDark + let buttonPrimaryBackgroundHover = VivoColors.palette.vivoPurpleDark | VivoColors.palette.vivoPurpleDark let buttonPrimaryBackgroundInverseSelected = VivoColors.palette.vivoPurpleLight50 | VivoColors.palette.vivoPurpleDark - let buttonSecondaryBorder = VivoColors.palette.vivoPurple | VivoColors.palette.white - let buttonSecondaryBorderSelected = VivoColors.palette.vivoPurpleDark | VivoColors.palette.white - + let buttonSecondaryBorderInverse = VivoColors.palette.white | VivoColors.palette.white let buttonSecondaryBackgroundHover = VivoColors.palette.vivoPurpleLight10 | VivoColors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundSelected = VivoColors.palette.vivoPurpleLight10 | VivoColors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBorderInverse = VivoColors.palette.white - - let buttonSecondaryBorderInverseSelected = VivoColors.palette.white - - let buttonSecondaryBackgroundInverseHover = VivoColors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBackgroundInverseSelected = VivoColors.palette.white.withAlphaComponent(0.15) - + let buttonSecondaryBorderInverseSelected = VivoColors.palette.white | VivoColors.palette.white + let buttonSecondaryBackgroundInverseHover = VivoColors.palette.white.withAlphaComponent(0.15) | VivoColors.palette.white.withAlphaComponent(0.15) + let buttonSecondaryBackgroundInverseSelected = VivoColors.palette.white.withAlphaComponent(0.15) | VivoColors.palette.white.withAlphaComponent(0.15) let textButtonPrimary = VivoColors.palette.white | VivoColors.palette.grey2 - let textButtonPrimaryInverse = VivoColors.palette.vivoPurple | VivoColors.palette.grey2 - let textButtonPrimaryInverseSelected = VivoColors.palette.vivoPurple | VivoColors.palette.grey2 - let textButtonSecondary = VivoColors.palette.vivoPurple | VivoColors.palette.grey2 - let textButtonSecondarySelected = VivoColors.palette.vivoPurpleDark | VivoColors.palette.grey2 - let textButtonSecondaryInverse = VivoColors.palette.white | VivoColors.palette.grey2 - let textButtonSecondaryInverseSelected = VivoColors.palette.white | VivoColors.palette.grey2 - let textLink = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight50 - let textLinkInverse = VivoColors.palette.white | VivoColors.palette.vivoPurpleLight50 - - let textLinkDanger = VivoColors.palette.pepper - - let textLinkSnackbar = VivoColors.palette.vivoPurpleLight50 - + let textLinkDanger = VivoColors.palette.pepper | VivoColors.palette.pepper + let textLinkSnackbar = VivoColors.palette.vivoPurpleLight50 | VivoColors.palette.vivoPurpleLight50 let textActivated = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight80 - let textBrand = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight80 - let control = VivoColors.palette.grey3 | VivoColors.palette.darkModeGrey6 - let controlActivated = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight80 - let controlInverse = VivoColors.palette.vivoPurpleLight50 | VivoColors.palette.darkModeGrey6 - let controlActivatedInverse = VivoColors.palette.white | VivoColors.palette.vivoPurpleLight80 - - let controlError = VivoColors.palette.pepper - + let controlError = VivoColors.palette.pepper | VivoColors.palette.pepper let barTrack = VivoColors.palette.grey3 | VivoColors.palette.darkModeGrey6 - let loadingBar = VivoColors.palette.pink | VivoColors.palette.vivoPurpleLight80 - let loadingBarBackground = VivoColors.palette.pepperLight30 | VivoColors.palette.darkModeGrey6 - let toggleAndroidInactive = VivoColors.palette.grey2 | VivoColors.palette.grey4 - let toggleAndroidBackgroundActive = VivoColors.palette.vivoPurpleLight20 | VivoColors.palette.vivoPurpleLight50 - let iosControlKnob = VivoColors.palette.white | VivoColors.palette.grey2 - let divider = VivoColors.palette.grey2 | VivoColors.palette.white.withAlphaComponent(0.05) - let dividerInverse = VivoColors.palette.white.withAlphaComponent(0.2) | VivoColors.palette.white.withAlphaComponent(0.05) - let navigationBarDivider = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack - - let badge = VivoColors.palette.pepperDark - - let feedbackErrorBackground = VivoColors.palette.pepper - - let feedbackInfoBackground = VivoColors.palette.grey6 - + let badge = VivoColors.palette.pepperDark | VivoColors.palette.pepperDark + let feedbackErrorBackground = VivoColors.palette.pepper | VivoColors.palette.pepper + let feedbackInfoBackground = VivoColors.palette.grey6 | VivoColors.palette.grey6 let brand = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight80 - let brandHigh = VivoColors.palette.vivoPurpleDark | VivoColors.palette.white.withAlphaComponent(0.05) - let inverse = VivoColors.palette.white | VivoColors.palette.grey2 - let neutralHigh = VivoColors.palette.grey6 | VivoColors.palette.grey2 - - let neutralMedium = VivoColors.palette.grey5 - - let neutralMediumInverse = VivoColors.palette.grey5 - + let neutralMedium = VivoColors.palette.grey5 | VivoColors.palette.grey5 + let neutralMediumInverse = VivoColors.palette.grey5 | VivoColors.palette.grey5 let neutralLow = VivoColors.palette.grey1 | VivoColors.palette.darkModeGrey6 - let neutralLowAlternative = VivoColors.palette.grey2 | VivoColors.palette.darkModeGrey6 - let textPrimary = VivoColors.palette.grey6 | VivoColors.palette.grey2 - let textPrimaryInverse = VivoColors.palette.white | VivoColors.palette.grey2 - let textSecondary = VivoColors.palette.grey5 | VivoColors.palette.grey4 - let textSecondaryInverse = VivoColors.palette.vivoPurpleLight20 | VivoColors.palette.grey4 - - let success = VivoColors.palette.vivoGreen - - let warning = VivoColors.palette.orange - - let error = VivoColors.palette.pepper - - let textError = VivoColors.palette.pepper - + let error = VivoColors.palette.pepper | VivoColors.palette.pepper + let textError = VivoColors.palette.pepper | VivoColors.palette.pepper let textErrorInverse = VivoColors.palette.white | VivoColors.palette.pepper - + let success = VivoColors.palette.vivoGreen | VivoColors.palette.vivoGreen + let warning = VivoColors.palette.orange | VivoColors.palette.orange let promo = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight80 - - let highlight = VivoColors.palette.pink - + let highlight = VivoColors.palette.pink | VivoColors.palette.pink let successLow = VivoColors.palette.vivoGreenLight10 | VivoColors.palette.darkModeGrey6 - let warningLow = VivoColors.palette.orangeLight10 | VivoColors.palette.darkModeGrey6 - let errorLow = VivoColors.palette.pepperLight10 | VivoColors.palette.darkModeGrey6 - let promoLow = VivoColors.palette.vivoPurpleLight10 | VivoColors.palette.darkModeGrey6 - let brandLow = VivoColors.palette.vivoPurpleLight10 | VivoColors.palette.darkModeGrey6 - let successHigh = VivoColors.palette.vivoGreenDark | VivoColors.palette.vivoGreenLight30 - let warningHigh = VivoColors.palette.orangeDark | VivoColors.palette.orangeLight40 - let errorHigh = VivoColors.palette.pepperDark80 | VivoColors.palette.pepperLight40 - let promoHigh = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight50 - - let successHighInverse = VivoColors.palette.vivoGreenDark - - let warningHighInverse = VivoColors.palette.orangeDark - - let errorHighInverse = VivoColors.palette.pepperDark80 - - let promoHighInverse = VivoColors.palette.vivoPurple - + let successHighInverse = VivoColors.palette.vivoGreenDark | VivoColors.palette.vivoGreenDark + let warningHighInverse = VivoColors.palette.orangeDark | VivoColors.palette.orangeDark + let errorHighInverse = VivoColors.palette.pepperDark80 | VivoColors.palette.pepperDark80 + let promoHighInverse = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurple let textNavigationBarPrimary = VivoColors.palette.white | VivoColors.palette.grey2 - let textNavigationBarSecondary = VivoColors.palette.vivoPurpleLight50 | VivoColors.palette.grey4 - let textNavigationSearchBarHint = VivoColors.palette.vivoPurpleLight50 | VivoColors.palette.grey4 - let textNavigationSearchBarText = VivoColors.palette.white | VivoColors.palette.grey2 - let textAppBar = VivoColors.palette.grey4 | VivoColors.palette.grey5 - let textAppBarSelected = VivoColors.palette.vivoPurple | VivoColors.palette.grey2 - let customTabsBackground = VivoColors.palette.vivoPurple | VivoColors.palette.darkModeBlack - let tagTextPromo = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight50 - let tagTextActive = VivoColors.palette.vivoPurple | VivoColors.palette.vivoPurpleLight80 - - let tagTextInactive = VivoColors.palette.grey5 - + let tagTextInactive = VivoColors.palette.grey5 | VivoColors.palette.grey5 let tagTextSuccess = VivoColors.palette.vivoGreenDark | VivoColors.palette.vivoGreenLight30 - let tagTextWarning = VivoColors.palette.orangeDark | VivoColors.palette.orangeLight40 - let tagTextError = VivoColors.palette.pepperDark80 | VivoColors.palette.pepperLight40 - let tagBackgroundPromo = VivoColors.palette.vivoPurpleLight10 | VivoColors.palette.darkModeGrey6 - let tagBackgroundActive = VivoColors.palette.vivoPurpleLight10 | VivoColors.palette.darkModeGrey6 - let tagBackgroundInactive = VivoColors.palette.grey1 | VivoColors.palette.darkModeGrey6 - let tagBackgroundSuccess = VivoColors.palette.vivoGreenLight10 | VivoColors.palette.darkModeGrey6 - let tagBackgroundWarning = VivoColors.palette.orangeLight10 | VivoColors.palette.darkModeGrey6 - let tagBackgroundError = VivoColors.palette.pepperLight10 | VivoColors.palette.darkModeGrey6 + let cardContentOverlay = MisticaColor.gradient(MisticaGradient( + colors: + [ + VivoColors.palette.grey6.withAlphaComponent(0) | VivoColors.palette.grey6.withAlphaComponent(0), + VivoColors.palette.grey6.withAlphaComponent(0.4) | VivoColors.palette.grey6.withAlphaComponent(0.4), + VivoColors.palette.grey6.withAlphaComponent(0.7) | VivoColors.palette.grey6.withAlphaComponent(0.7) + ], + stops: [0, 0.3, 1], + angle: 180 + )) } public struct VivoColorPalette { diff --git a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift index eb0e62b2..ed681768 100644 --- a/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift +++ b/Sources/MisticaCommon/Colors/VivoNewColorPalette.swift @@ -10,264 +10,145 @@ import UIKit struct VivoNewColors: MisticaColors { static let palette = VivoNewColorPalette() - - let background = VivoNewColors.palette.white | VivoNewColors.palette.darkModeBlack - - let backgroundAlternative = VivoNewColors.palette.grey1 | VivoNewColors.palette.darkModeBlack - let backgroundBrand = MisticaColor.solid(VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack) - let backgroundBrandSecondary = VivoNewColors.palette.vivoPurpleLight80 | VivoNewColors.palette.darkModeBlack - + let appBarBackground = VivoNewColors.palette.white | VivoNewColors.palette.darkModeGrey + let background = VivoNewColors.palette.white | VivoNewColors.palette.darkModeBlack let backgroundContainer = VivoNewColors.palette.white | VivoNewColors.palette.darkModeGrey - let backgroundContainerError = VivoNewColors.palette.pepperLight10 | VivoNewColors.palette.darkModeGrey - let backgroundContainerHover = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.03) | VivoNewColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerPressed = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.05) | VivoNewColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrand = MisticaColor.solid(VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeGrey) - let backgroundContainerBrandHover = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.2) | VivoNewColors.palette.white.withAlphaComponent(0.03) - let backgroundContainerBrandPressed = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.4) | VivoNewColors.palette.white.withAlphaComponent(0.05) - let backgroundContainerBrandOverInverse = VivoNewColors.palette.vivoPurpleDark | VivoNewColors.palette.darkModeGrey - let backgroundContainerAlternative = VivoNewColors.palette.grey1 | VivoNewColors.palette.darkModeGrey - let backgroundOverlay = VivoNewColors.palette.grey6.withAlphaComponent(0.6) | VivoNewColors.palette.darkModeGrey.withAlphaComponent(0.8) - let backgroundSkeleton = VivoNewColors.palette.grey4 | VivoNewColors.palette.darkModeGrey6 - let backgroundSkeletonInverse = VivoNewColors.palette.vivoPurpleDark | VivoNewColors.palette.darkModeGrey6 - + let navigationBarBackground = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack + let backgroundAlternative = VivoNewColors.palette.grey1 | VivoNewColors.palette.darkModeBlack let backgroundBrandTop = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack - let backgroundBrandBottom = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack - - let appBarBackground = VivoNewColors.palette.white | VivoNewColors.palette.darkModeGrey - - let navigationBarBackground = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack - let skeletonWave = VivoNewColors.palette.grey2 | VivoNewColors.palette.grey5 - let borderLow = VivoNewColors.palette.grey1 | VivoNewColors.palette.darkModeBlack - let border = VivoNewColors.palette.grey3 | VivoNewColors.palette.darkModeGrey - - let borderHigh = VivoNewColors.palette.grey5 - - let borderSelected = VivoNewColors.palette.vivoPurple - - let coverBackgroundHover = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.25) - - let coverBackgroundPressed = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.35) - - let buttonDangerBackground = VivoNewColors.palette.pepper - - let buttonDangerBackgroundSelected = VivoNewColors.palette.pepperDark - - let buttonDangerBackgroundHover = VivoNewColors.palette.pepperDark - + let borderHigh = VivoNewColors.palette.grey5 | VivoNewColors.palette.grey5 + let borderSelected = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurple + let coverBackgroundHover = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.25) | VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.25) + let coverBackgroundPressed = VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.35) | VivoNewColors.palette.darkModeBlack.withAlphaComponent(0.35) + let buttonDangerBackground = VivoNewColors.palette.pepper | VivoNewColors.palette.pepper + let buttonDangerBackgroundSelected = VivoNewColors.palette.pepperDark | VivoNewColors.palette.pepperDark + let buttonDangerBackgroundHover = VivoNewColors.palette.pepperDark | VivoNewColors.palette.pepperDark let buttonLinkDangerBackgroundSelected = VivoNewColors.palette.pepperLight10 | VivoNewColors.palette.white.withAlphaComponent(0.08) - let buttonLinkDangerBackgroundInverse = VivoNewColors.palette.white | VivoNewColors.palette.white.withAlphaComponent(0) - let buttonLinkDangerBackgroundInverseSelected = VivoNewColors.palette.pepperLight10 | VivoNewColors.palette.white.withAlphaComponent(0.08) - let buttonLinkBackgroundSelected = VivoNewColors.palette.vivoPurpleLight10 | VivoNewColors.palette.white.withAlphaComponent(0.08) - let buttonLinkBackgroundInverseSelected = VivoNewColors.palette.white.withAlphaComponent(0.1) | VivoNewColors.palette.white.withAlphaComponent(0.08) - let buttonPrimaryBackground = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight80 - let buttonPrimaryBackgroundInverse = VivoNewColors.palette.white | VivoNewColors.palette.vivoPurpleLight80 - - let buttonPrimaryBackgroundSelected = VivoNewColors.palette.vivoPurpleDark - - let buttonPrimaryBackgroundHover = VivoNewColors.palette.vivoPurpleDark - + let buttonPrimaryBackgroundSelected = VivoNewColors.palette.vivoPurpleDark | VivoNewColors.palette.vivoPurpleDark + let buttonPrimaryBackgroundHover = VivoNewColors.palette.vivoPurpleDark | VivoNewColors.palette.vivoPurpleDark let buttonPrimaryBackgroundInverseSelected = VivoNewColors.palette.vivoPurpleLight50 | VivoNewColors.palette.vivoPurpleDark - let buttonSecondaryBorder = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.white - let buttonSecondaryBorderSelected = VivoNewColors.palette.vivoPurpleDark | VivoNewColors.palette.white - + let buttonSecondaryBorderInverse = VivoNewColors.palette.white | VivoNewColors.palette.white let buttonSecondaryBackgroundHover = VivoNewColors.palette.vivoPurpleLight10 | VivoNewColors.palette.white.withAlphaComponent(0.15) - let buttonSecondaryBackgroundSelected = VivoNewColors.palette.vivoPurpleLight10 | VivoNewColors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBorderInverse = VivoNewColors.palette.white - - let buttonSecondaryBorderInverseSelected = VivoNewColors.palette.white - - let buttonSecondaryBackgroundInverseHover = VivoNewColors.palette.white.withAlphaComponent(0.15) - - let buttonSecondaryBackgroundInverseSelected = VivoNewColors.palette.white.withAlphaComponent(0.15) - + let buttonSecondaryBorderInverseSelected = VivoNewColors.palette.white | VivoNewColors.palette.white + let buttonSecondaryBackgroundInverseHover = VivoNewColors.palette.white.withAlphaComponent(0.15) | VivoNewColors.palette.white.withAlphaComponent(0.15) + let buttonSecondaryBackgroundInverseSelected = VivoNewColors.palette.white.withAlphaComponent(0.15) | VivoNewColors.palette.white.withAlphaComponent(0.15) let textButtonPrimary = VivoNewColors.palette.white | VivoNewColors.palette.grey2 - let textButtonPrimaryInverse = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.grey2 - let textButtonPrimaryInverseSelected = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.grey2 - let textButtonSecondary = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.grey2 - let textButtonSecondarySelected = VivoNewColors.palette.vivoPurpleDark | VivoNewColors.palette.grey2 - let textButtonSecondaryInverse = VivoNewColors.palette.white | VivoNewColors.palette.grey2 - let textButtonSecondaryInverseSelected = VivoNewColors.palette.white | VivoNewColors.palette.grey2 - let textLink = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight50 - let textLinkInverse = VivoNewColors.palette.white | VivoNewColors.palette.vivoPurpleLight50 - - let textLinkDanger = VivoNewColors.palette.pepper - + let textLinkDanger = VivoNewColors.palette.pepper | VivoNewColors.palette.pepper let textLinkSnackbar = VivoNewColors.palette.vivoPurpleLight20 | VivoNewColors.palette.vivoPurpleLight50 - let textActivated = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight80 - let textBrand = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight80 - let control = VivoNewColors.palette.grey4 | VivoNewColors.palette.darkModeGrey6 - let controlActivated = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight80 - let controlInverse = VivoNewColors.palette.vivoPurpleLight50 | VivoNewColors.palette.darkModeGrey6 - let controlActivatedInverse = VivoNewColors.palette.white | VivoNewColors.palette.vivoPurpleLight80 - - let controlError = VivoNewColors.palette.pepper - + let controlError = VivoNewColors.palette.pepper | VivoNewColors.palette.pepper let barTrack = VivoNewColors.palette.grey3 | VivoNewColors.palette.darkModeGrey6 - let loadingBar = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight80 - let loadingBarBackground = VivoNewColors.palette.vivoPurpleLight10 | VivoNewColors.palette.darkModeGrey6 - let toggleAndroidInactive = VivoNewColors.palette.grey2 | VivoNewColors.palette.grey4 - let toggleAndroidBackgroundActive = VivoNewColors.palette.vivoPurpleLight20 | VivoNewColors.palette.vivoPurpleLight50 - let iosControlKnob = VivoNewColors.palette.white | VivoNewColors.palette.grey2 - let divider = VivoNewColors.palette.grey3 | VivoNewColors.palette.white.withAlphaComponent(0.05) - let dividerInverse = VivoNewColors.palette.white.withAlphaComponent(0.2) | VivoNewColors.palette.white.withAlphaComponent(0.05) - let navigationBarDivider = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.darkModeBlack - - let badge = VivoNewColors.palette.pepperDark - - let feedbackErrorBackground = VivoNewColors.palette.pepper - + let badge = VivoNewColors.palette.pepperDark | VivoNewColors.palette.pepperDark + let feedbackErrorBackground = VivoNewColors.palette.pepper | VivoNewColors.palette.pepper let feedbackInfoBackground = VivoNewColors.palette.vivoPurpleDark | VivoNewColors.palette.grey6 - let brand = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight80 - let brandHigh = VivoNewColors.palette.vivoPurpleDark | VivoNewColors.palette.white.withAlphaComponent(0.05) - let inverse = VivoNewColors.palette.white | VivoNewColors.palette.grey2 - let neutralHigh = VivoNewColors.palette.grey6 | VivoNewColors.palette.grey2 - - let neutralMedium = VivoNewColors.palette.grey5 - - let neutralMediumInverse = VivoNewColors.palette.grey5 - + let neutralMedium = VivoNewColors.palette.grey5 | VivoNewColors.palette.grey5 + let neutralMediumInverse = VivoNewColors.palette.grey5 | VivoNewColors.palette.grey5 let neutralLow = VivoNewColors.palette.grey1 | VivoNewColors.palette.darkModeGrey6 - let neutralLowAlternative = VivoNewColors.palette.grey2 | VivoNewColors.palette.darkModeGrey6 - let textPrimary = VivoNewColors.palette.grey6 | VivoNewColors.palette.grey2 - let textPrimaryInverse = VivoNewColors.palette.white | VivoNewColors.palette.grey2 - let textSecondary = VivoNewColors.palette.grey5 | VivoNewColors.palette.grey4 - let textSecondaryInverse = VivoNewColors.palette.vivoPurpleLight20 | VivoNewColors.palette.grey4 - - let success = VivoNewColors.palette.vivoGreen - - let warning = VivoNewColors.palette.orange - - let error = VivoNewColors.palette.pepper - - let textError = VivoNewColors.palette.pepper - + let error = VivoNewColors.palette.pepper | VivoNewColors.palette.pepper + let textError = VivoNewColors.palette.pepper | VivoNewColors.palette.pepper let textErrorInverse = VivoNewColors.palette.white | VivoNewColors.palette.pepper - + let success = VivoNewColors.palette.vivoGreen | VivoNewColors.palette.vivoGreen + let warning = VivoNewColors.palette.orange | VivoNewColors.palette.orange let promo = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight80 - - let highlight = VivoNewColors.palette.pink - + let highlight = VivoNewColors.palette.pink | VivoNewColors.palette.pink let successLow = VivoNewColors.palette.vivoGreenLight10 | VivoNewColors.palette.darkModeGrey6 - let warningLow = VivoNewColors.palette.orangeLight10 | VivoNewColors.palette.darkModeGrey6 - let errorLow = VivoNewColors.palette.pepperLight10 | VivoNewColors.palette.darkModeGrey6 - let promoLow = VivoNewColors.palette.vivoPurpleLight10 | VivoNewColors.palette.darkModeGrey6 - let brandLow = VivoNewColors.palette.vivoPurpleLight10 | VivoNewColors.palette.darkModeGrey6 - let successHigh = VivoNewColors.palette.vivoGreenDark | VivoNewColors.palette.vivoGreenLight30 - let warningHigh = VivoNewColors.palette.orangeDark | VivoNewColors.palette.orangeLight40 - let errorHigh = VivoNewColors.palette.pepperDark80 | VivoNewColors.palette.pepperLight40 - let promoHigh = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight50 - - let successHighInverse = VivoNewColors.palette.vivoGreenDark - - let warningHighInverse = VivoNewColors.palette.orangeDark - - let errorHighInverse = VivoNewColors.palette.pepperDark80 - - let promoHighInverse = VivoNewColors.palette.vivoPurple - + let successHighInverse = VivoNewColors.palette.vivoGreenDark | VivoNewColors.palette.vivoGreenDark + let warningHighInverse = VivoNewColors.palette.orangeDark | VivoNewColors.palette.orangeDark + let errorHighInverse = VivoNewColors.palette.pepperDark80 | VivoNewColors.palette.pepperDark80 + let promoHighInverse = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurple let textNavigationBarPrimary = VivoNewColors.palette.white | VivoNewColors.palette.grey2 - let textNavigationBarSecondary = VivoNewColors.palette.vivoPurpleLight50 | VivoNewColors.palette.grey4 - let textNavigationSearchBarHint = VivoNewColors.palette.vivoPurpleLight50 | VivoNewColors.palette.grey4 - let textNavigationSearchBarText = VivoNewColors.palette.white | VivoNewColors.palette.grey2 - - let textAppBar = VivoNewColors.palette.grey5 - + let textAppBar = VivoNewColors.palette.grey5 | VivoNewColors.palette.grey5 let textAppBarSelected = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.grey2 - let customTabsBackground = VivoNewColors.palette.white | VivoNewColors.palette.darkModeBlack - let tagTextPromo = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight50 - let tagTextActive = VivoNewColors.palette.vivoPurple | VivoNewColors.palette.vivoPurpleLight80 - - let tagTextInactive = VivoNewColors.palette.grey5 - + let tagTextInactive = VivoNewColors.palette.grey5 | VivoNewColors.palette.grey5 let tagTextSuccess = VivoNewColors.palette.vivoGreenDark | VivoNewColors.palette.vivoGreenLight30 - let tagTextWarning = VivoNewColors.palette.orangeDark | VivoNewColors.palette.orangeLight40 - let tagTextError = VivoNewColors.palette.pepperDark80 | VivoNewColors.palette.pepperLight40 - let tagBackgroundPromo = VivoNewColors.palette.vivoPurpleLight10 | VivoNewColors.palette.darkModeGrey6 - let tagBackgroundActive = VivoNewColors.palette.vivoPurpleLight10 | VivoNewColors.palette.darkModeGrey6 - let tagBackgroundInactive = VivoNewColors.palette.grey1 | VivoNewColors.palette.darkModeGrey6 - let tagBackgroundSuccess = VivoNewColors.palette.vivoGreenLight10 | VivoNewColors.palette.darkModeGrey6 - let tagBackgroundWarning = VivoNewColors.palette.orangeLight10 | VivoNewColors.palette.darkModeGrey6 - let tagBackgroundError = VivoNewColors.palette.pepperLight10 | VivoNewColors.palette.darkModeGrey6 + let cardContentOverlay = MisticaColor.gradient(MisticaGradient( + colors: + [ + VivoNewColors.palette.grey6.withAlphaComponent(0) | VivoNewColors.palette.grey6.withAlphaComponent(0), + VivoNewColors.palette.grey6.withAlphaComponent(0.4) | VivoNewColors.palette.grey6.withAlphaComponent(0.4), + VivoNewColors.palette.grey6.withAlphaComponent(0.7) | VivoNewColors.palette.grey6.withAlphaComponent(0.7) + ], + stops: [0, 0.3, 1], + angle: 180 + )) } public struct VivoNewColorPalette { diff --git a/Sources/MisticaCommon/Fonts/MisticaFontSizes.swift b/Sources/MisticaCommon/Fonts/MisticaFontSizes.swift index 071ec95e..02615970 100644 --- a/Sources/MisticaCommon/Fonts/MisticaFontSizes.swift +++ b/Sources/MisticaCommon/Fonts/MisticaFontSizes.swift @@ -6,7 +6,7 @@ // Copyright © Telefonica. All rights reserved. // -import UIKit +import Foundation public protocol MisticaFontSizes { var tabsLabel: CGFloat { get }