How to specify colors in AI image generation

How to specify colors in AI image generation

A practical guide to steering an AI image model toward the colors you want, using color names, hex values, palette language, and a reference image.

What does it mean to specify colors in AI image generation?

Specifying colors means steering the image model toward a chosen palette instead of letting it pick. You can do this with words (color names, hex values, and mood), with a reference image the model samples from, or with both together. Words get you most of the way for a general look; a reference is what you reach for when the colors have to be exact.

Morphic runs every major image model in one place, so you can prompt a palette, compare how different models interpret it, and carry one look across a whole set.

Lead with the palette, not the subject

Put the colors near the front of the prompt and keep the list short. "A warm palette of terracotta, ochre, and cream: a still life of ceramics on a wooden table" reads more reliably than burying the colors at the end. Two or three colors hold; five compete and the model starts dropping some.

Anchor each color to an object

Models honor color best when it is attached to something. "A red door in a grey stone wall under a pale blue sky" lands more precisely than "red, grey, and blue". Tie each color to a surface, and name the light, since warm or cool light shifts every color in the frame.

Add hex and precise names when it matters

For a target color, pair a hex value with a plain name so the model has both signals: "deep teal #0f766e". Treat hex as a strong hint, not a pixel-exact instruction. Generate a few and pick the closest; the palette will cluster around your target.

Color cueExample wordingHow reliable
Plain color namessage green, warm clay, creamHigh for a general palette
Descriptive moodmuted autumnal, sun-faded, high-key pastelHigh for a feel, looser on exact hue
Hex valuesdeep teal #0f766e, bone #e7e2d8A strong hint; cluster, not pixel-exact
Reference imageupload a photo or swatch, image-to-imageHighest for an exact palette

Match an exact palette with a reference

When words are not enough, upload a reference (a photo, a frame, or a swatch sheet) and use image-to-image. The model reads the colors straight from the picture and carries them into your new subject. This is the closest you can get to an exact brand palette.

Fix off-color results instead of restarting

If one color drifts, do not rewrite everything, correct in place. Regenerate with the stubborn color anchored to a clearer object, lower the count of competing colors, or take the best result into image-to-image and nudge the grade warmer, cooler, or more muted.

Example: four palettes, one subject

The same still life, generated on four different specified palettes. The subject stays put; only the colors change.

Still life on a warm terracotta and cream palette
Warm earth: terracotta, ochre, cream
The same still life on a cool teal and slate palette
Cool: teal, slate, pale sand
The same still life on a soft pastel palette
Pastel: blush, mint, butter yellow
The same still life on a muted neutral palette
Neutral: greige, bone, taupe

Where to go next

Once you can hit a palette, the next steps are choosing palettes that work together and holding one across a set. Build a scheme with the AI illustration color schemes guide, keep one look across many images with consistent AI image styles, or jump straight in with the AI color palette generator.

FAQs

Do hex codes work in AI image prompts?
They help, but treat them as a strong hint rather than an exact instruction. Image models read a hex value as 'aim for roughly this color', so the result lands in the right region without matching the code pixel for pixel. For an exact color, pair the hex with a plain name ('deep teal #0f766e') and, when it has to be precise, add a reference image.
How do I match the colors from an existing image?
Upload that image as a reference and use image-to-image. The model samples the palette directly from the picture, which is far more reliable than describing the colors in words, and it carries the same look into a new subject or scene.
Why does the AI keep ignoring my color?
Usually the color is competing with a stronger association, a 'forest' leans green no matter what, or the prompt names too many colors at once. Lead with the palette, keep it to two or three colors, and anchor each color to a specific object ('a red door, grey stone walls') rather than floating it in the scene.
Can I set a background color separately from the subject?
Yes. Name them separately in the prompt ('on a solid dusty-pink background') and the model keeps them distinct. For a clean flat backdrop you can also generate on any background and key it out afterwards, then drop in the exact color you need.