geesawra.industries/hydraulophone
An unofficial YouTube Music app for iPhone, iPad, and Mac.
0
0
import SwiftUI
import UIKit
enum HydraulophoneTheme {
/// A saturated purple keeps Hydraulophone recognizable without imitating
/// another service's artwork, marks, or branded controls.
///
/// The light variant has an approximately 8.20:1 contrast ratio with white.
/// The dark variant is approximately 4.64:1 with black and 4.52:1 with
/// white, keeping both text/icon use and filled controls legible.
static let accent = Color(
uiColor: UIColor { traits in
if traits.userInterfaceStyle == .dark {
return UIColor(red: 0.58, green: 0.35, blue: 0.83, alpha: 1)
}
return UIColor(red: 0.40, green: 0.18, blue: 0.68, alpha: 1)
}
)
static let accentSoft = Color(
uiColor: UIColor { traits in
if traits.userInterfaceStyle == .dark {
return UIColor(red: 0.18, green: 0.12, blue: 0.28, alpha: 1)
}
return UIColor(red: 0.94, green: 0.90, blue: 1.0, alpha: 1)
}
)
static let cardFill = Color.primary.opacity(0.055)
static let groupedBackground = Color(uiColor: .systemGroupedBackground)
}
extension View {
func hydraulophoneCard(cornerRadius: CGFloat = 14) -> some View {
background(HydraulophoneTheme.cardFill, in: RoundedRectangle(cornerRadius: cornerRadius))
}
}