studio notes
The site that redraws itself
How I rebuilt nhg.design around a random color pair drawn before first paint, and why no two visits look the same.
· Robert Csaszar
tl;dr
- Every visit draws one of 342 color pairs before the browser paints anything
- A 32-bit seed keeps the generative art fixed for the whole visit and different on the next
- The strict monochrome stage is what lets the random color be loud
- The whole thing is a few hundred lines with no library
Reload this page and watch the hero. Go on, I’ll wait. The colors changed. I did that on purpose: it’s the one ritual this site performs on every visit, and I built the rest of the design to make room for it.
the draw
Before the browser paints anything, a small inline script in the document head draws two colors. One is a dark, saturated “main” from a list of eighteen, the other a bright pastel “secondary” from a list of nineteen. It writes them onto the root element as --color-main and --color-secondary. Every accent on the site reads from those two variables: link underlines, the selection color, the hero artwork, hover states on cards. Nothing else on the page is allowed to carry color.
Here is the draw, extracted from the site so you can run it by hand:
Eighteen mains and nineteen secondaries make 342 possible sites, and you were served one of them when you arrived. The other 341 are sulking. Come back tomorrow and you will probably get another (or refresh).
the seed
Color is only half of it. The draw also produces a 32-bit seed. The hero runs a WebGL ribbon field in the pair colors (move your pointer, or click it), and every work thumbnail plots a De Jong attractor. Both are fed from that seed through a deterministic PRNG, mulberry32. Each canvas mixes the visit seed with its own stable key, so the hero and every thumbnail get different art, but the same art for the whole visit. Navigate around and things hold still. Reload and the studio rearranges itself.
I care more about the determinism than the randomness. Random art that changes every frame is a screensaver. Random art that is fixed for exactly one visit feels like a print you were handed at the door.
why bother
My brand line is “show yourself more”, and I think a studio site should practice what it sells. Most agency sites are a template with the logo swapped, and I wanted the opposite: a strict monochrome stage, near-black on near-white, mono annotations in the margins, and one loud random voice on top. Because ink and paper never change, the pair can be as loud as it likes without the page falling apart.
There’s a quieter reason too. Someone who notices the site looks different from yesterday has learned something true about the studio: the system underneath is stable and the surface is alive. That is roughly what I try to build for clients as well.
The whole mechanism is a few hundred lines. It’s one inline script, one theme module that is the typed vault for the palettes, and two canvas components. No library.
lessons learned
- Let exactly two variables carry all the color, and the whole site re-themes from one draw
- Mixing the visit seed with a stable key per canvas gives every piece its own art without any of it jittering
- Reduced motion costs little: one settled frame, same pair, same seed
- A site can show its own method just by changing
If you build something like this, put the draw before first paint. A theme that flashes its fallback and then corrects itself gives the trick away.