diff --git a/orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt b/orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt index dcae0f4f..e7930a34 100644 --- a/orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt +++ b/orx-color/src/jvmDemo/kotlin/DemoColorPlane01.kt @@ -38,7 +38,7 @@ fun main() { for (hue in 0 until 360 step 4) { for (chroma in 0 until 100 step 1) { val lch = ColorOKLCHa(cos(seconds * 0.1) * 0.5 + 0.5, chroma / 100.0, hue.toDouble()) - val srgb = lch.toRGBa().toSRGB().saturated + val srgb = lch.toRGBa().toSRGB().clip() write(srgb) write(Vector3((srgb.r - 0.5) * 10.0, (srgb.g - 0.5) * 10.0, (srgb.b - 0.5) * 10.0)) } diff --git a/orx-color/src/jvmDemo/kotlin/DemoColorPlane02.kt b/orx-color/src/jvmDemo/kotlin/DemoColorPlane02.kt index 318768d7..d3a8c941 100644 --- a/orx-color/src/jvmDemo/kotlin/DemoColorPlane02.kt +++ b/orx-color/src/jvmDemo/kotlin/DemoColorPlane02.kt @@ -35,7 +35,7 @@ fun main() { for (lumo in 0 until 100 step 1) { for (chroma in 0 until 100 step 1) { val lch = ColorOKLCHa(lumo / 100.0, chroma / 100.0, cos(seconds * 0.1) * 360.0) - val srgb = lch.toRGBa().toSRGB().saturated + val srgb = lch.toRGBa().toSRGB().clip() write(srgb) write(Vector3((srgb.r - 0.5) * 10.0, (srgb.g - 0.5) * 10.0, (srgb.b - 0.5) * 10.0)) } diff --git a/orx-color/src/jvmDemo/kotlin/DemoColorRange04.kt b/orx-color/src/jvmDemo/kotlin/DemoColorRange04.kt index 9e03fa6e..b3ad3e1e 100644 --- a/orx-color/src/jvmDemo/kotlin/DemoColorRange04.kt +++ b/orx-color/src/jvmDemo/kotlin/DemoColorRange04.kt @@ -48,7 +48,7 @@ fun main() { drawer.fontMap = loadFont("demo-data/fonts/IBMPlexMono-Regular.ttf", 16.0) for ((_, steps) in allSteps) { for (i in steps.indices) { - val srgb = steps[i].toSRGB().saturated + val srgb = steps[i].toSRGB().clip() drawer.fill = srgb drawer.isolated { drawer.translate((srgb.r - 0.5) * 10.0, (srgb.g - 0.5) * 10.0, (srgb.b - 0.5) * 10.0) @@ -56,7 +56,7 @@ fun main() { } } val positions = steps.map { - val l = it.toSRGB().saturated + val l = it.toSRGB().clip() Vector3((l.r - 0.5) * 10.0, (l.g - 0.5) * 10.0, (l.b - 0.5) * 10.0) } drawer.stroke = ColorRGBa.BLACK.opacify(0.25)