← All repositories

listless

A simple list app for Apple platforms

git clone https://code.inqk.net/listless.git


ListlessiOS/Helpers/AppColors.swift (893B)

1import SwiftUI
2import UIKit
3
4extension Color {
5    /// Canvas behind item cards: warm gray in light mode, black in dark mode.
6    static let outerBackground = Color(uiColor: UIColor { traits in
7        traits.userInterfaceStyle == .dark
8            ? .black
9            : UIColor(red: 0.922, green: 0.906, blue: 0.886, alpha: 1)  // #EBE7E2
10    })
11
12    /// Card surface: warm tint in light mode, elevated dark gray in dark mode.
13    static let itemCard = Color(uiColor: UIColor { traits in
14        traits.userInterfaceStyle == .dark
15            ? UIColor.secondarySystemBackground
16            : .white
17    })
18
19    /// Selected background for completed rows.
20    static let completedSelected = Color(uiColor: UIColor { traits in
21        traits.userInterfaceStyle == .dark
22            ? UIColor(white: 0.12, alpha: 1)
23            : UIColor(red: 0.88, green: 0.86, blue: 0.83, alpha: 1)
24    })
25}