Thanks for sharing this, I have modified above code to convert Kotlin / Compose Multiplatform Color to UIColor
fun toUIColor(c: Color): UIColor {
return UIColor(red = c.red.toDouble(), green = c.green.toDouble(), blue = c.blue.toDouble(), alpha = c.alpha.toDouble())
}