From c14bd7a928200ee5206c0d942b23180938c6d473 Mon Sep 17 00:00:00 2001 From: Daniel Arantes Loverde Date: Wed, 27 May 2026 14:38:02 -0300 Subject: [PATCH] fix(android): apply robust static RGB colors and compatible background opacity fallback --- .../PediFoods/DesignSystem/DesignSystem.swift | 30 +++++++++---------- .../PediFoods/Views/Auth/LoginView.swift | 8 +++++ 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/pedi-foods/Sources/PediFoods/DesignSystem/DesignSystem.swift b/pedi-foods/Sources/PediFoods/DesignSystem/DesignSystem.swift index 7e44d11..fd90ec8 100644 --- a/pedi-foods/Sources/PediFoods/DesignSystem/DesignSystem.swift +++ b/pedi-foods/Sources/PediFoods/DesignSystem/DesignSystem.swift @@ -10,27 +10,27 @@ import AppKit enum AppColors { // Brandbook 2026 (Pedi Foods) // Primary now follows the "FOODS" dark green tone from the logo. - static let primary = Color(hex: "#345D54") + static let primary = Color(.sRGB, red: 52/255.0, green: 93/255.0, blue: 84/255.0, opacity: 1.0) // Secondary keeps the vivid lime from the symbol/logo body. - static let secondary = Color(hex: "#D5D841") - static let tertiary = Color(hex: "#A7BF42") + static let secondary = Color(.sRGB, red: 213/255.0, green: 216/255.0, blue: 65/255.0, opacity: 1.0) + static let tertiary = Color(.sRGB, red: 167/255.0, green: 191/255.0, blue: 66/255.0, opacity: 1.0) - static let brandDark = Color(hex: "#1F2D40") - static let brandSoft = Color(hex: "#F2F5E3") + static let brandDark = Color(.sRGB, red: 31/255.0, green: 45/255.0, blue: 64/255.0, opacity: 1.0) + static let brandSoft = Color(.sRGB, red: 242/255.0, green: 245/255.0, blue: 227/255.0, opacity: 1.0) - static let backgroundLight = Color(hex: "#F3F5F7") - static let backgroundDark = Color(hex: "#1F2D40") - static let surface = Color(hex: "#FFFFFF") - static let textPrimary = Color(hex: "#000000") - static let textInverse = Color(hex: "#FFFFFF") - static let textMuted = Color(hex: "#667085") + static let backgroundLight = Color(.sRGB, red: 243/255.0, green: 245/255.0, blue: 247/255.0, opacity: 1.0) + static let backgroundDark = Color(.sRGB, red: 31/255.0, green: 45/255.0, blue: 64/255.0, opacity: 1.0) + static let surface = Color.white + static let textPrimary = Color.black + static let textInverse = Color.white + static let textMuted = Color(.sRGB, red: 102/255.0, green: 112/255.0, blue: 133/255.0, opacity: 1.0) } enum AppDarkColors { - static let background = Color(hex: "#1F2D40") - static let surface = Color(hex: "#FFFFFF", alpha: 0.08) - static let textPrimary = Color(hex: "#FFFFFF") - static let textSecondary = Color(hex: "#D0D5DD") + static let background = Color(.sRGB, red: 31/255.0, green: 45/255.0, blue: 64/255.0, opacity: 1.0) + static let surface = Color.white.opacity(0.08) + static let textPrimary = Color.white + static let textSecondary = Color(.sRGB, red: 208/255.0, green: 213/255.0, blue: 221/255.0, opacity: 1.0) static let primary = AppColors.primary static let secondary = AppColors.secondary static let tertiary = AppColors.tertiary diff --git a/pedi-foods/Sources/PediFoods/Views/Auth/LoginView.swift b/pedi-foods/Sources/PediFoods/Views/Auth/LoginView.swift index 685c9d8..cf87135 100644 --- a/pedi-foods/Sources/PediFoods/Views/Auth/LoginView.swift +++ b/pedi-foods/Sources/PediFoods/Views/Auth/LoginView.swift @@ -43,6 +43,13 @@ struct LoginView: View { (colorScheme == .dark ? Color.black : AppColors.backgroundLight) .ignoresSafeArea() +#if os(Android) + pinHeroImage + .scaledToFill() + .frame(height: heroHeight + 80) + .offset(y: heroVisible ? -60 : -(heroHeight + 220)) + .opacity(colorScheme == .dark ? 0.08 : 0.15) +#else pinHeroImage .scaledToFill() .frame(height: heroHeight + 80) @@ -54,6 +61,7 @@ struct LoginView: View { endPoint: .bottom ) ) +#endif VStack(spacing: 18) { Spacer().frame(height: logoTopInset)