diff --git a/orx-chataigne/src/main/kotlin/ChataigneOSC.kt b/orx-chataigne/src/main/kotlin/ChataigneOSC.kt index eee9332b..c711cbc3 100644 --- a/orx-chataigne/src/main/kotlin/ChataigneOSC.kt +++ b/orx-chataigne/src/main/kotlin/ChataigneOSC.kt @@ -29,8 +29,12 @@ open class ChataigneOSC( init { osc.listen(key) { - val c = it[0] as Color - currentColor = ColorRGBa(c.red / 255.0, c.green / 255.0, c.blue / 255.0, c.alpha / 255.0) + val red = it[0] as Float + val green = it[1] as Float + val blue = it[2] as Float + val alpha = it[3] as Float + + currentColor = ColorRGBa(red.toDouble(), green.toDouble(), blue.toDouble(), alpha.toDouble()) } } @@ -49,4 +53,4 @@ open class ChataigneOSC( "setup Chataigne with OSC ${osc.address} in:${osc.portIn} out:${osc.portOut}" } } -} \ No newline at end of file +}