←back to thread

85 points stanko | 1 comments | | HN request time: 0.232s | source
Show context
efskap ◴[] No.44538236[source]
Cool stuff! Flattening things like colours into a 1D value is an interesting challenge here. How did you decide to weigh the R channel an order of magnitude higher than G and so on? I might've tried working with HSV for instance, since it feels like animations would often be along one of those axes, but maybe not.
replies(2): >>44538314 #>>44539478 #
1. stanko ◴[] No.44539478[source]
Thank you! As for color conversion, I didn’t spend too much time thinking about the conversion. Because I’m using canvas to transform CSS colors to RGBA, I just went and multiplied them in order by powers on 10.

It can definitely be improved. Using HSL or even OKLch would probably give nicer results. I may look into it.