nanopython / color
HSL / RGB color picker
Two coupled slider banks, one Python state. Moving an HSL slider recomputes the RGB triple in main.py and back-fills the RGB sliders; moving an RGB slider does the reverse. Float-less integer sector arithmetic on both sides of the conversion.
Loading…
HSL
RGB
#000000
Notes
RGB is the internal state. The HSL sector formula uses integer chroma C = (100 - |2L - 100|) * S / 100 picked by H / 60, scaled to 0–255 only at the end. The two slider banks are linked through an _updating flag so write-back never re-fires its own input event.