-import SwiftUI
-
-struct MapColor {
- let foreground: Color
- let background: Color
- let secondary: Color
- let blocker: Color
- let opportunity: Color
- let stages: StageColor
- let syntax: SyntaxColor
-
- static func colorForScheme(_ colorScheme: ColorScheme) -> MapColor {
- if colorScheme == .dark {
- return MapColor(
- foreground: Color.white,
- background: Color(.sRGB, red: 0.13, green: 0.13, blue: 0.13),
- secondary: Color(.sRGB, red: 0.81, green: 0.78, blue: 0.79),
- blocker: Color(.sRGB, red: 0.13, green: 0.13, blue: 0.13),
- opportunity: Color(.sRGB, red: 1.0, green: 0.37, blue: 0.34),
- stages: StageColor(
- i: Color(.sRGB, red: 0.37, green: 0.16, blue: 0.25),
- ii: Color(.sRGB, red: 0.30, green: 0.29, blue: 0.26),
- iii: Color(.sRGB, red: 0.15, green: 0.29, blue: 0.23),
- iv: Color(.sRGB, red: 0.14, green: 0.22, blue: 0.31)),
- syntax: SyntaxColor(
- vertex: NSColor(srgbRed: 0.41, green: 0.84, blue: 0.96, alpha: 1.0),
- number: NSColor(srgbRed: 0.85, green: 0.78, blue: 0.49, alpha: 1.0),
- option: NSColor(srgbRed: 1.0, green: 0.48, blue: 0.7, alpha: 1.0), // #FE7AB3
- symbol: NSColor(srgbRed: 0.85, green: 0.73, blue: 1.0, alpha: 1.0) // #DABBFF
- ))
- } else {
- return MapColor(
- foreground: Color(.sRGB, red: 0.13, green: 0.13, blue: 0.13),
- background: Color.white,
- secondary: Color.gray,
- blocker: Color(.sRGB, red: 0.60, green: 0.52, blue: 0.51),
- opportunity: Color(.sRGB, red: 1.0, green: 0.37, blue: 0.34),
- stages: StageColor(
- i: Color(.sRGB, red: 1.00, green: 0.93, blue: 0.97),
- ii: Color(.sRGB, red: 1.00, green: 0.98, blue: 0.92),
- iii: Color(.sRGB, red: 0.93, green: 1.00, blue: 0.97),
- iv: Color(.sRGB, red: 0.93, green: 0.96, blue: 1.00)),
- syntax: SyntaxColor(
- vertex: NSColor(srgbRed: 0.11, green: 0.42, blue: 0.57, alpha: 1.0),
- number: NSColor(srgbRed: 0.27, green: 0.31, blue: 0.87, alpha: 1.0),
- option: NSColor(srgbRed: 0.68, green: 0.24, blue: 0.64, alpha: 1.0),
- symbol: NSColor(srgbRed: 0.29, green: 0.13, blue: 0.69, alpha: 1.0)
- ))
- }
- }
-}
-
-struct StageColor {
- let i: Color
- let ii: Color
- let iii: Color
- let iv: Color
-}
-
-struct SyntaxColor {
- let vertex: NSColor
- let number: NSColor
- let option: NSColor
- let symbol: NSColor
-}