

Covers that change with your theme
My site has seven colour themes, but a cover is one image. An AI model paints the light in two colours I never show, a script turns them into masks, and CSS recolours it to match the theme.
12 posts with this tag.


My site has seven colour themes, but a cover is one image. An AI model paints the light in two colours I never show, a script turns them into masks, and CSS recolours it to match the theme.


My code blocks used to carry a style attribute on every word, written by Shiki from a theme file. Now twinkleplop gives each token a class and the site's CSS colours it. I compared the two builds character by character before keeping it.


My light theme was the dark one with the lights on. The first fix was too loud; comparing three directions with screenshots found the right one, ink green on warm white, and a test makes sure the grid never takes text below 4.5:1.


My site's background is a blueprint grid that lights up around the mouse. It looked great and read badly. How I found every piece of text sitting on it, and the one rule that fixed them all.


My site now has six colour themes, from Tokyo Night to Solarized. Each is one CSS file, no component changed, and a unit test checks every theme's contrast.


My background grid lights up around the mouse. Where it ran under text, the text dropped to 1.89:1. How I measured a translucent layer, and how I picked the strongest effect that still passes.


Every logo on my about page keeps its brand's hue but takes its lightness from the theme, with a little OKLab math and CSS relative colors.


Highlighting code blocks at build time with Shiki, and a small TextMate theme whose colors are CSS variables, so code follows my site's themes.


Reading CSS custom properties in the browser, turning any CSS color into sRGB with a canvas, and the light-dark() surprise along the way.


I replaced Open Props' grays with my own blue-gray scale in oklch, picked a terminal green, and designed the dark theme first. Why oklch makes a scale even, and what "dark first" means in light-dark().


Fira Code for code, a handwritten font for my dev log and the system font everywhere else. No Google Fonts, no extra cost on pages that don't use them.


Why my components use --text-1 instead of --gray-8, and how a small tokens.css made dark mode a one-file change.