Does anyone know if itโs possible to get HCL color in Quil?
If you're in the JVM land you can use clojure2d.color in quil. https://clojure2d.github.io/clojure2d/docs/codox/clojure2d.color.html#var-to-HCL
RGB color defined in quil will work in Clojure2d without any conversion.
To convert from Clojure2d to Quil call clojure2d.color/quil
HCL defined in Clojure2d is based on Sarifuddin/Missaou method with ฮป=3. If you want a converter based on CIELab color space use LCH. There are also other like: JCH (based on JzAzBz) and Oklch (based on Oklab).
That looks great, thank you! I suppose I can get most of the benefits of HCL by creating my gradients in HCL with Clojure2D, then converting back to the HSB space Iโm using for most things in Quil.
Gradients are best in Oklab. You can find more about gradients here https://clojure2d.github.io/clojure2d/docs/notebooks/index.html#/notebooks/color.clj
And yeah, it's easy to make such interop. I can help you with this if you wish.
Generally hue based color spaces are not good for gradients, because they force traversing through many hue values.
Ahh, interesting. Yeah, I knew HSB worked better than RGB for that. Then I read about HCL preserving luminance across the hues, but Oklab is unknown to me so far.
Here is more about this: https://bottosson.github.io/posts/oklab/
Generally all linear luma based color spaces like lab, luv, oklab, jab, etc. are good when you want to keep brightness under control. All above also nicely blend hues.
Hue based just can introduce unwanted colors giving a rainbow effect. However, for generative art it can be very beneficial :)
I sometimes like the results of those hue rainbows, but there are definitely times when I want a gradient directly between two colors that are not adjacent in hue. I should certainly add a lab scheme to my toolbox. Thanks for the advice. :)