Generating random bright colors
On the index page of the site, you can see a chronologically sorted list of posts. When you hover this list, you’ll notice that the colors are randomized.
I originally tried to implement this using the Cicada Principle. However, I ran into two main issues: first, I had to hand-code all the colors I wanted, so the list was definitely finite, and second, it wasn’t really random - the pattern is definitely static. That effectively meant that the order of the colors was static, as if you passed a seed to the RNG.
I ended up deciding to use JS, since I figure I’ve been adding JS to random posts here anyway (ah the joys of Astro and markdown!). Between generating bright and dark colors, HSL is much easier to use. The code below lets you generate bright colors, which is exactly what I use for this site. To generate darker colors, simply change the range for the lightness!
And of course, for the demo: here’sa randomlist of linksto showcasemy point.