KrabCode / LazyGui

GUI library for Processing in which you only mention control elements in draw() at the places you need them.
https://krabcode.github.io/LazyGui/
MIT License
83 stars 4 forks source link

Use Sinebow for HSB color picker #228

Open micycle1 opened 1 year ago

micycle1 commented 1 year ago

The "sinebow" gives a more linear (better) hue cycle vs the naive HSB-based “angry” rainbow.

See https://observablehq.com/@mbostock/sinebow https://observablehq.com/@jobleonard/linear-sinebow

wrightwriter commented 1 year ago

any reason to use that over okhsv/okhsl?

micycle1 commented 1 year ago

okhsv would be even better I suppose (a little more complicated though).

wrightwriter commented 1 year ago

It's a couple of multiplies and divisions, everyone copies the code anyways :) Should be trivial to add and lerp in.

wrightwriter commented 1 year ago

There's also the separate issue of lerping linearly between points in the picker... I think it's fine, but you could fit a curve.

KrabCode commented 1 year ago

I'm open to approving pull requests on this but I don't understand it enough to make an effort myself here