Color+Extensions.swift 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import SwiftUI
  2. import UIKit
  3. extension Color {
  4. static let carbs = Color("carbs")
  5. static let fresh = Color("fresh")
  6. static let glucose = Color("glucose")
  7. static let insulin = Color("Insulin")
  8. // The loopAccent color is intended to be use as the app accent color.
  9. public static let loopAccent = Color("accent")
  10. public static let warning = Color("warning")
  11. }
  12. // Color version of the UIColor context colors
  13. public extension Color {
  14. static let agingColor = warning
  15. static let axisLabelColor = secondary
  16. static let axisLineColor = clear
  17. #if os(iOS)
  18. static let cellBackgroundColor = Color(UIColor.cellBackgroundColor)
  19. static let gridColor = Color(UIColor.gridColor)
  20. static let unknownColor = Color(UIColor.unknownColor)
  21. #endif
  22. static let carbTintColor = carbs
  23. static let critical = red
  24. static let destructive = critical
  25. static let glucoseTintColor = glucose
  26. static let invalid = critical
  27. static let insulinTintColor = insulin
  28. static let pumpStatusNormal = insulin
  29. static let staleColor = critical
  30. }
  31. extension Color {
  32. static let loopGray = Color("LoopGray")
  33. static let loopGreen = Color("LoopGreen")
  34. static let loopYellow = Color("LoopYellow")
  35. static let loopRed = Color("LoopRed")
  36. static let loopManualTemp = Color("ManualTempBasal")
  37. static let bgDarkBlue = Color("Background_DarkBlue")
  38. static let bgDarkerDarkBlue = Color("Background_DarkerDarkBlue")
  39. static let chart = Color("Chart")
  40. static let tabBar = Color("TabBar")
  41. // static let insulin = Color("Insulin")
  42. static let uam = Color("UAM")
  43. static let zt = Color("ZT")
  44. static let tempBasal = Color("TempBasal")
  45. static let basal = Color("Basal")
  46. static let darkerBlue = Color("DarkerBlue")
  47. static let loopPink = Color("LoopPink")
  48. static let lemon = Color("Lemon")
  49. static let minus = Color("minus")
  50. static let darkGray = Color("darkGray")
  51. }