Deth

Fitness and everything else

HSL Colors

For the nearly twenty-five years that I have had this website, I have used hex colors. That’s just what I knew. Back in the early days, the colors were embedded in the HTML, not even CSS yet. Somehow I stumbled on HSL and got to contemplating switching over to that.

I am okay with estimating the manipulation of hex to get the general colors I want. When it comes to the smaller manipulations and fine-tuning, I am a little less able to grasp the changes I am looking for if the colors are more mixed. I’d been considering switching my CSS to that for a while. HSL was brought to my attention when I made the template change the temperature’s text color to be based on the temperature. Finally, I got around to switching the color space today. While there, I made a few tweaks, and it was much more intuitive.

When I was testing it out on the local Zola server, I checked out the CSS file that was generated, and it still had the hex numbers. I spent more time than I want to admit looking for how I screwed up. After some playing around, I realized that grass was converting the HSL from the SCSS files back to hex. That was a nice surprise since that seems to be the most common color form, plus it is the most compatible. I don’t use SCSS for more than a few calculations, but it’s a nice preprocessor language.

I need to explore SCSS more and use it to its full potential. I was hesitant to rely on it with Hugo since that project changed the processor a couple of times when I used it and I just didn’t trust that the DART version would remain available for FreeBSD. It’s not in the ports. With Zola, it uses a Rust library, which is compiled right into the binary. Rust is also a FreeBSD port.