LazyGui icon indicating copy to clipboard operation
LazyGui copied to clipboard

Use Sinebow for HSB color picker

Open micycle1 opened this issue 2 years ago • 5 comments

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

micycle1 avatar Apr 04 '23 18:04 micycle1

any reason to use that over okhsv/okhsl?

wrightwriter avatar Apr 04 '23 18:04 wrightwriter

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

micycle1 avatar Apr 04 '23 18:04 micycle1

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

wrightwriter avatar Apr 04 '23 18:04 wrightwriter

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.

wrightwriter avatar Apr 04 '23 18:04 wrightwriter

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

KrabCode avatar Apr 05 '23 18:04 KrabCode