03-01-2025, 07:38 AM
Very nice!
I might add an alternative "color picker" to ngui using that for hue selection. The current one uses a rectangle where the horizontal axis represents hue and the vertical saturation. With a hue wheel you'd need two sliders to control the saturation and brightness, right? But I think it would be easier to use than the current color picker:
I might add an alternative "color picker" to ngui using that for hue selection. The current one uses a rectangle where the horizontal axis represents hue and the vertical saturation. With a hue wheel you'd need two sliders to control the saturation and brightness, right? But I think it would be easier to use than the current color picker:
Code:
include "ngui.n7"
set window "Color picker", 640, 480
set redraw off
root = VBox(SIZE_EXPAND, SIZE_EXPAND)
root.SetHalign(ALIGN_CENTER)
root.SetSpacing(8)
colorPicker = ColorPicker(function(wdg, r, g, b)
pln "Selected color: " + r + ", " + g + ", " + b
endfunc)
root.Add(Header("Color picker", SIZE_AUTO, SIZE_AUTO))
root.Add(colorPicker)
EnterMainLoop(root)