← Journey PHASE 4B — n8n design agents

Pinning the Accent Color in OllamaRefine

Photo by Marek Piwnicki on Unsplash

OllamaRefine kept drifting the brand accent from #E84E15 to muted blues and teals. One prompt change locks it.

The refine step in the n8n design agent pipeline runs a second Ollama pass to clean up HTML output — tighten spacing, fix hierarchy, that kind of thing. The problem: it was silently replacing #E84E15 with whatever it felt like. Most common offenders were #A3B4C0 (slate-blue) and #00D2BE (teal). Both look like plausible UI colors, which is exactly why it took a few runs to notice.

The fix was explicit reinforcement directly in the OllamaRefine prompt. The previous instruction set said to “preserve brand colors” — too vague. The model treats that as a soft suggestion when it’s also being asked to improve contrast or harmonize a palette. The new prompt hardcodes the value:

The accent color is #E84E15. Do not change it, approximate it, or substitute it for any reason.

That one sentence is doing all the work. Putting it before the styling instructions, not after, matters — Ollama weighs earlier context more heavily in practice.

Removed
  • Vague 'preserve brand colors' instruction in OllamaRefine prompt
Added
  • Explicit #E84E15 pin with no-substitution rule in OllamaRefine prompt

What this unblocks

With the accent color stable across both the generate and refine passes, the HTML output is now consistent enough to feed into downstream Penpot sync without manual correction. That clears the way for wiring the full generate → refine → sync pipeline end to end.