Skip to content

Commit

Permalink
Fixed when foreground color has an error
Browse files Browse the repository at this point in the history
  • Loading branch information
joshdholtz committed Jan 12, 2025
1 parent 0a0e463 commit cb94a09
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,12 @@ fileprivate extension View {
) -> some View {
switch color.effectiveColor(for: colorScheme) {
case .hex:
let color = color.toDynamicColor()

// Do not apply a clear text color
// Use the default color
if color.hasError {
self
} else {
self.foregroundColor(color)
self.foregroundColor(color.toDynamicColor())
}
case .linear(let degrees, _):
self.overlay {
Expand Down

0 comments on commit cb94a09

Please sign in to comment.