feat: apply pink Opal design with reactive square persona
This commit is contained in:
1 parent
5b41b3924a
commit
74d2b63614
8 files changed
+199
-57
No files matched your search
+21
-19
@@ -8,21 +8,24 @@ import UIKit
|
||||
enum Nearlight {
|
||||
// MARK: Palette (light / dark variants)
|
||||
|
||||
/// Screen background.
|
||||
static let ground = Color(light: UIColor(red: 0.957, green: 0.949, blue: 0.965, alpha: 1),
|
||||
dark: UIColor(red: 0.110, green: 0.098, blue: 0.125, alpha: 1))
|
||||
/// Controls, grouped rows, dock.
|
||||
static let surface = Color(light: .white,
|
||||
dark: UIColor(red: 0.157, green: 0.137, blue: 0.180, alpha: 1))
|
||||
/// Primary text.
|
||||
static let ink = Color(light: UIColor(red: 0.161, green: 0.137, blue: 0.184, alpha: 1),
|
||||
dark: UIColor(red: 0.965, green: 0.937, blue: 0.969, alpha: 1))
|
||||
/// Supporting text, inactive icons.
|
||||
static let quiet = Color(light: UIColor(red: 0.396, green: 0.365, blue: 0.424, alpha: 1),
|
||||
dark: UIColor(red: 0.749, green: 0.698, blue: 0.776, alpha: 1))
|
||||
/// Action tint, selection, Lightwell.
|
||||
static let rosewood = Color(light: UIColor(red: 0.529, green: 0.278, blue: 0.380, alpha: 1),
|
||||
dark: UIColor(red: 0.890, green: 0.635, blue: 0.737, alpha: 1))
|
||||
/// Opal screen background: luminous pink-white #FFFDFD / deep plum #201820.
|
||||
static let ground = Color(light: UIColor(red: 255 / 255, green: 253 / 255, blue: 253 / 255, alpha: 1),
|
||||
dark: UIColor(red: 32 / 255, green: 24 / 255, blue: 32 / 255, alpha: 1))
|
||||
/// Controls, grouped rows, dock: #FFF7FA / #302330.
|
||||
static let surface = Color(light: UIColor(red: 255 / 255, green: 247 / 255, blue: 250 / 255, alpha: 1),
|
||||
dark: UIColor(red: 48 / 255, green: 35 / 255, blue: 48 / 255, alpha: 1))
|
||||
/// The square persona's pale pink stage: #FFF2F7 / #3B2836.
|
||||
static let personaSurface = Color(light: UIColor(red: 255 / 255, green: 242 / 255, blue: 247 / 255, alpha: 1),
|
||||
dark: UIColor(red: 59 / 255, green: 40 / 255, blue: 54 / 255, alpha: 1))
|
||||
/// Primary text: readable dark plum #302B40 / #FFF2F7.
|
||||
static let ink = Color(light: UIColor(red: 48 / 255, green: 43 / 255, blue: 64 / 255, alpha: 1),
|
||||
dark: UIColor(red: 255 / 255, green: 242 / 255, blue: 247 / 255, alpha: 1))
|
||||
/// Supporting text, inactive icons: plum #706074 / #CBB6C7.
|
||||
static let quiet = Color(light: UIColor(red: 112 / 255, green: 96 / 255, blue: 116 / 255, alpha: 1),
|
||||
dark: UIColor(red: 203 / 255, green: 182 / 255, blue: 199 / 255, alpha: 1))
|
||||
/// Opal action rose #A64270 / #F0A8C8; retains the existing semantic API.
|
||||
static let rosewood = Color(light: UIColor(red: 166 / 255, green: 66 / 255, blue: 112 / 255, alpha: 1),
|
||||
dark: UIColor(red: 240 / 255, green: 168 / 255, blue: 200 / 255, alpha: 1))
|
||||
/// Errors and destructive actions.
|
||||
static let alert = Color(light: UIColor(red: 0.675, green: 0.208, blue: 0.282, alpha: 1),
|
||||
dark: UIColor(red: 1.0, green: 0.604, blue: 0.675, alpha: 1))
|
||||
@@ -35,10 +38,9 @@ enum Nearlight {
|
||||
static var selectedWash: Color { rosewood.opacity(0.10) }
|
||||
/// Error wash: Alert at 8% over Surface.
|
||||
static var errorWash: Color { alert.opacity(0.08) }
|
||||
/// Primary-action label: Surface in light, Ground in dark.
|
||||
static var onRosewood: Color {
|
||||
UITraitCollection.current.userInterfaceStyle == .dark ? ground : surface
|
||||
}
|
||||
/// Primary-action label: white on strong rose, deep plum on the dark-mode pink.
|
||||
static let onRosewood = Color(light: .white,
|
||||
dark: UIColor(red: 32 / 255, green: 24 / 255, blue: 32 / 255, alpha: 1))
|
||||
|
||||
// MARK: Spacing scale
|
||||
|
||||
|
||||
Reference in new issue
Block a user