Color+Extensions.swift 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 insulin = Color("Insulin")
  38. static let uam = Color("UAM")
  39. static let zt = Color("ZT")
  40. static let tempBasal = Color("TempBasal")
  41. static let basal = Color("Basal")
  42. static let darkerBlue = Color("DarkerBlue")
  43. static let loopPink = Color("LoopPink")
  44. static let lemon = Color("Lemon")
  45. static let minus = Color("minus")
  46. static let darkGray = Color("darkGray")
  47. }