[orx-panel] Fix colorspace used for text input in ColorPicker

This commit is contained in:
Edwin Jakobs
2025-09-20 08:20:35 +02:00
parent f836d86857
commit d411b428b8
2 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,33 @@
import org.openrndr.application
import org.openrndr.color.ColorRGBa
import org.openrndr.panel.controlManager
import org.openrndr.panel.elements.colorpickerButton
/**
* A simple demonstration of a ColorPickerButton
*/
fun main() = application {
configure {
width = 720
height = 720
}
program {
var bgColor = ColorRGBa.PINK
val cm = controlManager {
layout {
colorpickerButton {
label = "Pick color"
color = bgColor
events.valueChanged.listen {
bgColor = it.color
}
}
}
}
extend(cm)
extend {
drawer.clear(bgColor)
}
}
}