fix(android): apply robust static RGB colors and compatible background opacity fallback

This commit is contained in:
Daniel Arantes Loverde
2026-05-27 14:38:02 -03:00
parent 68864ee21a
commit c14bd7a928
2 changed files with 23 additions and 15 deletions

View File

@@ -10,27 +10,27 @@ import AppKit
enum AppColors { enum AppColors {
// Brandbook 2026 (Pedi Foods) // Brandbook 2026 (Pedi Foods)
// Primary now follows the "FOODS" dark green tone from the logo. // 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. // Secondary keeps the vivid lime from the symbol/logo body.
static let secondary = Color(hex: "#D5D841") static let secondary = Color(.sRGB, red: 213/255.0, green: 216/255.0, blue: 65/255.0, opacity: 1.0)
static let tertiary = Color(hex: "#A7BF42") 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 brandDark = Color(.sRGB, red: 31/255.0, green: 45/255.0, blue: 64/255.0, opacity: 1.0)
static let brandSoft = Color(hex: "#F2F5E3") 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 backgroundLight = Color(.sRGB, red: 243/255.0, green: 245/255.0, blue: 247/255.0, opacity: 1.0)
static let backgroundDark = Color(hex: "#1F2D40") static let backgroundDark = Color(.sRGB, red: 31/255.0, green: 45/255.0, blue: 64/255.0, opacity: 1.0)
static let surface = Color(hex: "#FFFFFF") static let surface = Color.white
static let textPrimary = Color(hex: "#000000") static let textPrimary = Color.black
static let textInverse = Color(hex: "#FFFFFF") static let textInverse = Color.white
static let textMuted = Color(hex: "#667085") static let textMuted = Color(.sRGB, red: 102/255.0, green: 112/255.0, blue: 133/255.0, opacity: 1.0)
} }
enum AppDarkColors { enum AppDarkColors {
static let background = Color(hex: "#1F2D40") static let background = Color(.sRGB, red: 31/255.0, green: 45/255.0, blue: 64/255.0, opacity: 1.0)
static let surface = Color(hex: "#FFFFFF", alpha: 0.08) static let surface = Color.white.opacity(0.08)
static let textPrimary = Color(hex: "#FFFFFF") static let textPrimary = Color.white
static let textSecondary = Color(hex: "#D0D5DD") 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 primary = AppColors.primary
static let secondary = AppColors.secondary static let secondary = AppColors.secondary
static let tertiary = AppColors.tertiary static let tertiary = AppColors.tertiary

View File

@@ -43,6 +43,13 @@ struct LoginView: View {
(colorScheme == .dark ? Color.black : AppColors.backgroundLight) (colorScheme == .dark ? Color.black : AppColors.backgroundLight)
.ignoresSafeArea() .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 pinHeroImage
.scaledToFill() .scaledToFill()
.frame(height: heroHeight + 80) .frame(height: heroHeight + 80)
@@ -54,6 +61,7 @@ struct LoginView: View {
endPoint: .bottom endPoint: .bottom
) )
) )
#endif
VStack(spacing: 18) { VStack(spacing: 18) {
Spacer().frame(height: logoTopInset) Spacer().frame(height: logoTopInset)