]>
Commit | Line | Data |
---|---|---|
5e8ff485 RBR |
1 | import SwiftUI |
2 | ||
3 | struct MapColor { | |
4 | let foreground: Color | |
5 | let background: Color | |
6 | let secondary: Color | |
7 | let blocker: Color | |
8 | let opportunity: Color | |
9 | let stages: StageColor | |
10 | ||
11 | static func colorForScheme(_ colorScheme: ColorScheme) -> MapColor { | |
12 | if colorScheme == .dark { | |
13 | return MapColor( | |
14 | foreground: Color.white, | |
15 | background: Color(.sRGB, red: 0.13, green: 0.13, blue: 0.13), | |
16 | secondary: Color(.sRGB, red: 0.81, green: 0.78, blue: 0.79), | |
17 | blocker: Color(.sRGB, red: 0.13, green: 0.13, blue: 0.13), | |
18 | opportunity: Color(.sRGB, red: 1.0, green: 0.37, blue: 0.34), | |
19 | stages: StageColor( | |
20 | i: Color(.sRGB, red: 0.37, green: 0.16, blue: 0.25), | |
21 | ii: Color(.sRGB, red: 0.30, green: 0.29, blue: 0.26), | |
22 | iii: Color(.sRGB, red: 0.15, green: 0.29, blue: 0.23), | |
23 | iv: Color(.sRGB, red: 0.14, green: 0.22, blue: 0.31))) | |
24 | } else { | |
25 | return MapColor( | |
26 | foreground: Color(.sRGB, red: 0.13, green: 0.13, blue: 0.13), | |
27 | background: Color.white, | |
28 | secondary: Color.gray, | |
29 | blocker: Color(.sRGB, red: 0.60, green: 0.52, blue: 0.51), | |
30 | opportunity: Color(.sRGB, red: 1.0, green: 0.37, blue: 0.34), | |
31 | stages: StageColor( | |
32 | i: Color(.sRGB, red: 1.00, green: 0.93, blue: 0.97), | |
33 | ii: Color(.sRGB, red: 1.00, green: 0.98, blue: 0.92), | |
34 | iii: Color(.sRGB, red: 0.93, green: 1.00, blue: 0.97), | |
35 | iv: Color(.sRGB, red: 0.93, green: 0.96, blue: 1.00))) | |
36 | } | |
37 | } | |
38 | } | |
39 | ||
40 | struct StageColor { | |
41 | let i: Color | |
42 | let ii: Color | |
43 | let iii: Color | |
44 | let iv: Color | |
45 | } |