Merge nucleic/humble-willow-marten into dev

This commit is contained in:
2026-06-17 19:25:34 -07:00
parent fe2f931a2e
commit bcf91c0ac6
2 changed files with 26 additions and 7 deletions
+15 -6
View File
@@ -1,12 +1,21 @@
import SwiftUI
import UIKit
import NucleicProtocol
/// The mobile mirror of the Mac's design language (AppTheme/AppPalette on desktop): a deep
/// teal accent, the same categorical status palette, and the same status→color mapping
/// refined by turn disposition — so the two devices read identically. Pure SwiftUI Color
/// (no AppKit), adapting to light/dark via the system.
/// The mobile mirror of the Mac's design language (AppTheme/AppPalette on desktop): a
/// lavender/purple accent, the same categorical status palette, and the same status→color
/// mapping refined by turn disposition — so the two devices read identically. Pure SwiftUI
/// Color, adapting to light/dark via the system.
enum Palette {
static let accent = Color(red: 0.04, green: 0.52, blue: 0.50) // deep teal
/// Lavender/purple accent with a separate shade per appearance: a deep violet in light
/// (white labels read at ~5.4:1) and a brighter lavender in dark, so it lifts off the
/// near-black background instead of muddying into it. Mirrors the Mac's appearance-aware
/// accent (AppPalette, nightSoftened for dark).
static let accent = Color(uiColor: UIColor { trait in
trait.userInterfaceStyle == .dark
? UIColor(red: 0.66, green: 0.55, blue: 0.95, alpha: 1) // brighter lavender — dark mode
: UIColor(red: 0.45, green: 0.32, blue: 0.82, alpha: 1) // deep violet — light mode
})
static let active = Color(red: 0.20, green: 0.55, blue: 0.95) // blue
static let attention = Color(red: 1.00, green: 0.65, blue: 0.15) // amber
static let success = Color(red: 0.30, green: 0.80, blue: 0.45) // green
@@ -111,6 +120,6 @@ struct CardBackground: ViewModifier {
extension View {
func card(padding: CGFloat = 14) -> some View { modifier(CardBackground(padding: padding)) }
/// Apply the teal accent app-wide.
/// Apply the lavender accent app-wide.
func nucleicTint() -> some View { tint(Palette.accent) }
}