NumColor

Precise numeric color control in text-to-image generation. Type a hex code, get that color.

ECCV 2026

Muhammad Atif Butt, Diego Hernández, Alexandra Gomez-Villa, Kai Wang, Javier Vazquez-Corral, Joost van de Weijer

Ask a text-to-image model for “a #3254F7 car” and it will usually ignore the code. The tokenizer splits #3254F7 into fragments that carry no color meaning, so the model falls back to its own idea of the object. NumColor fixes this without retraining the generator. A Color Token Aggregator finds color codes in the prompt however they are tokenized, and a ColorBook of learnable embeddings, aligned with the perceptually uniform CIE Lab space, turns each code into an embedding the text encoder understands.

Try it
Pick one of the colors used in the paper, or choose any color and the demo jumps to the closest one. All images are results from the paper (FLUX with NumColor).

How it works

ColorBook is trained on NumColor-Data, a synthetic dataset of rendered images with an exact color-to-pixel correspondence. Two auxiliary losses keep the geometry of Lab space in the embedding space, so nearby colors get nearby embeddings and interpolation between codes stays smooth. NumColor is trained only on FLUX, yet it transfers zero-shot to SD3, SD3.5, PixArt-α, and PixArt-Σ, and it substantially improves numerical color accuracy and color harmony on GenColorBench.