I have attached the screenshots of the native SwiftUI app. <img width="1705" alt="image.png" src="attachments/59fec2f3-0ae2-4b58-9349-457618ea0678"> <img width="1699" alt="image.png" src="attachments/0bf7c4f9-c883-4929-be36-774685b82fc4"> <img width="1698" alt="image.png" src="attachments/e3407e84-aaf2-45c0-9325-247d4020bace"> <img width="1694" alt="image.png" src="attachments/ee2cd47d-800d-4a40-855c-d54856680e79"> <img width="1694" alt="image.png" src="attachments/a2c902f1-9bc9-4427-8cae-b5801527c1ff"> Co-authored-by: Sayan Datta <sayan@Sayans-MacBook-Air.local> Reviewed-on: #2 Co-authored-by: sayan <sayan@desineuron.in> Co-committed-by: sayan <sayan@desineuron.in>
61 lines
2.9 KiB
Swift
61 lines
2.9 KiB
Swift
import SwiftUI
|
|
|
|
// MARK: - Design Tokens matching the WebOS dark interface
|
|
enum VelocityTheme {
|
|
|
|
// ── Backgrounds ──────────────────────────────────
|
|
/// True black app background
|
|
static let background = Color(red: 0.00, green: 0.00, blue: 0.00)
|
|
/// Dark surface (#131418)
|
|
static let surface = Color(red: 0.074, green: 0.078, blue: 0.094)
|
|
/// Slightly lighter surface (#181b20)
|
|
static let surface2 = Color(red: 0.095, green: 0.106, blue: 0.125)
|
|
/// Card surface (#22262e)
|
|
static let surface3 = Color(red: 0.133, green: 0.149, blue: 0.180)
|
|
/// Sidebar background (#0B0D10)
|
|
static let sidebarBg = Color(red: 0.043, green: 0.051, blue: 0.063)
|
|
|
|
// ── Foreground ────────────────────────────────────
|
|
static let foreground = Color(white: 0.96)
|
|
static let mutedFg = Color(red: 0.580, green: 0.620, blue: 0.710)
|
|
static let subtleFg = Color(red: 0.35, green: 0.38, blue: 0.44)
|
|
|
|
// ── Accent: Blue (#3b82f6) ────────────────────────
|
|
static let accent = Color(red: 0.231, green: 0.510, blue: 0.965)
|
|
static let accentDim = Color(red: 0.160, green: 0.388, blue: 0.820)
|
|
static let accentSubtle = Color(red: 0.231, green: 0.510, blue: 0.965).opacity(0.15)
|
|
|
|
// ── Semantic ──────────────────────────────────────
|
|
static let success = Color(red: 0.290, green: 0.780, blue: 0.290)
|
|
static let warning = Color(red: 0.980, green: 0.745, blue: 0.141)
|
|
static let danger = Color(red: 0.973, green: 0.267, blue: 0.267)
|
|
|
|
// ── Borders ───────────────────────────────────────
|
|
static let borderSubtle = Color.white.opacity(0.07)
|
|
static let borderAccent = Color(red: 0.231, green: 0.510, blue: 0.965).opacity(0.18)
|
|
}
|
|
|
|
// MARK: - Glass card modifier
|
|
struct GlassCard: ViewModifier {
|
|
var cornerRadius: CGFloat = 16
|
|
|
|
func body(content: Content) -> some View {
|
|
content
|
|
.background(
|
|
RoundedRectangle(cornerRadius: cornerRadius)
|
|
.fill(Color(red: 0.031, green: 0.039, blue: 0.071).opacity(0.82))
|
|
.overlay(
|
|
RoundedRectangle(cornerRadius: cornerRadius)
|
|
.stroke(VelocityTheme.borderAccent, lineWidth: 1)
|
|
)
|
|
.shadow(color: .black.opacity(0.55), radius: 16, y: 4)
|
|
)
|
|
}
|
|
}
|
|
|
|
extension View {
|
|
func glassCard(cornerRadius: CGFloat = 16) -> some View {
|
|
self.modifier(GlassCard(cornerRadius: cornerRadius))
|
|
}
|
|
}
|