From 870cd9964a7ba0a6813b06e8bb3d1a368b2f955d Mon Sep 17 00:00:00 2001 From: Thomas Berghuis Date: Mon, 3 Jul 2023 13:12:03 +1000 Subject: [PATCH] fix for HsvColorPicker initialColor --- .../com/github/skydoves/colorpicker/compose/HsvColorPicker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/colorpicker-compose/src/main/kotlin/com/github/skydoves/colorpicker/compose/HsvColorPicker.kt b/colorpicker-compose/src/main/kotlin/com/github/skydoves/colorpicker/compose/HsvColorPicker.kt index a853f65..6bfebd2 100644 --- a/colorpicker-compose/src/main/kotlin/com/github/skydoves/colorpicker/compose/HsvColorPicker.kt +++ b/colorpicker-compose/src/main/kotlin/com/github/skydoves/colorpicker/compose/HsvColorPicker.kt @@ -178,7 +178,7 @@ public fun HsvColorPicker( (initialColor.blue * 255).toInt(), hsv ) - val angle = (Math.PI / 180f) * hsv[0] + val angle = (Math.PI / 180f) * hsv[0] * (-1) val saturationVector = pickerRadius * hsv[1] val x = saturationVector * cos(angle) + center.x val y = saturationVector * sin(angle) + center.y