This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-21
Channels
- # announcements (3)
- # aws (8)
- # babashka (14)
- # beginners (39)
- # biff (22)
- # cider (5)
- # clj-kondo (1)
- # cljs-dev (12)
- # cljsjs (4)
- # clojure (16)
- # clojure-europe (47)
- # clojure-germany (6)
- # clojure-uk (2)
- # clojurescript (36)
- # core-async (29)
- # cursive (19)
- # datalevin (14)
- # etaoin (10)
- # helix (1)
- # hyperfiddle (6)
- # introduce-yourself (5)
- # kaocha (43)
- # keechma (1)
- # lsp (7)
- # nbb (68)
- # new-channels (1)
- # off-topic (12)
- # pathom (11)
- # quil (14)
- # rdf (3)
- # re-frame (5)
- # reitit (6)
- # shadow-cljs (88)
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
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
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.