Skip to main content

Notes from building an AI design collaborator · part 10

The AI told me our brand colour with total confidence, and it was wrong

· 3 min read

I was building the thing that reads a product's real colours and spacing off its own code, and early on I did the lazy version. I just asked the model. "What's the primary colour here?" It told me instantly, a hex value, confident and specific and wrong. Not wildly wrong, which would have been fine because I'd have caught it. One shade off. The worst possible kind of wrong.

I didn't notice for about a week. By then that almost-right blue had gone into a pile of wireframes, quietly making everything look a little bit not-our-product in a way nobody could put their finger on. That's the whole danger with a made-up fact. It doesn't announce itself. It sits there being nearly true while everything built on top of it inherits the nearly.

So I stopped asking it for facts

The rule I landed on is a little strict and I've kept it ever since. The model never touches the ground truth.

What the model is genuinely brilliant at is writing code, so I let it do that instead. It looks at the product, works out how this particular stack stores its colours and spacing, and writes a small script to pull them. Then the script runs and reads the actual values. The model wrote the reader. The reader read the facts. At no point did I ask the model to remember a colour.

It sounds like a pedantic distinction and it completely isn't. When the model guesses, you get a vibe with a hex code stuck on it. When the model writes a script and the script reads the file, you get the value. Same model, same effort, and one path can hallucinate while the other simply can't, because there's no step left where anyone is asking it to recall a fact instead of go and fetch one.

Where it still bites

I want to be honest that this makes the extraction safe, not everything. Judgment sneaks back in at the edges. Inferring a spacing scale out of messy real numbers is a guess wearing the coat of a measurement. Naming a component is an opinion with a straight face. Those I keep flagged and quarantined, because pretending they're facts is the same mistake in nicer clothes.

But for anything the product has actually written down somewhere, the rule holds, and it's saved me from shipping a confident wrong answer more than once. So I don't ask the model what the colour is anymore. I ask it to write the thing that goes and reads it, and I let the file have the last word.


Part of a series on building an AI collaborator for our design team at Xflow. Each post stands on its own.

  • ai
  • tooling