Skip to content

Commit

Permalink
Share another helper
Browse files Browse the repository at this point in the history
  • Loading branch information
melbic committed Jul 18, 2023
1 parent c73088c commit 12dab02
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Sources/dreiKit/SwiftUI/Color+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ public extension Color {
dark darkModeColor: @escaping @autoclosure () -> Color
) {
self.init(UIColor(
light: UIColor(lightModeColor()),
dark: UIColor(darkModeColor())
light: lightModeColor().uiColor,
dark: darkModeColor().uiColor
))
}

var uiColor: UIColor {
UIColor(self)
}
}

0 comments on commit 12dab02

Please sign in to comment.