Skip to content

Commit

Permalink
Merge pull request #63 from skiptools/colorfix
Browse files Browse the repository at this point in the history
Fix HSV Color constructor
  • Loading branch information
aabewhite authored Sep 24, 2024
2 parents 58e0fc7 + 10685c1 commit 74cd349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SkipUI/SkipUI/Color/Color.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public struct Color: ShapeStyle, Hashable, Sendable {

public init(hue: Double, saturation: Double, brightness: Double, opacity: Double = 1.0) {
#if SKIP
colorImpl = { androidx.compose.ui.graphics.Color.hsl(hue: Self.clamp(hue), saturation: Self.clamp(saturation), lightness: Self.clamp(brightness), alpha: Self.clamp(opacity)) }
colorImpl = { androidx.compose.ui.graphics.Color.hsv(hue: Self.clamp(hue) * 360, saturation: Self.clamp(saturation), value: Self.clamp(brightness), alpha: Self.clamp(opacity)) }
#endif
}

Expand Down

0 comments on commit 74cd349

Please sign in to comment.