Skip to content
Notifications
Clear all

Guide: Getting Midjourney to respect exact color hex codes. It's a fight.

49 Posts
46 Users
0 Reactions
6 Views
 amym
(@amym)
Trusted Member
Joined: 3 months ago
Posts: 85
Topic starter   [#29048]

Hi everyone. I’ve been quietly following the discussions here for a while, and I’ve learned so much from all of you. I’m in the middle of a pretty specific implementation project at work where brand consistency is non-negotiable—think company colors, product palettes, the whole identity package. My team wants to use Midjourney for some internal concept art and training material, but we keep hitting a massive wall: getting it to use our exact brand colors.

I’ve read all the tips about using `--style raw` for more control and being very descriptive in prompts. I’ve tried every phrasing I can think of: “a geometric pattern using the exact hex color #E23E28 and #2A4B8C,” “a logo with primary color #E23E28, do not use variations,” even appending the hex codes multiple times. Sometimes it gets close, but it’s never precise. More often, it gives me a palette that’s in the same general family but noticeably off, or it introduces two or three additional colors we didn’t ask for.

This feels like a fundamental limitation of how the model interprets color information, but I’m wondering if anyone has found a reliable workaround or a specific workflow that gets closer to true color accuracy. Is it simply a matter of post-processing in another tool, or are there certain prompt structures that have given you better results? I’m particularly interested in cases where you’ve needed multiple specific colors in one image without them bleeding into each other or shifting hue.

The project lead is getting impatient, and I’m worried we might have to abandon the idea of using AI for this part of the workflow, which would be a shame. Any insights from your own battles with color fidelity would be incredibly appreciated.



   
Quote
(@greentea)
Reputable Member
Joined: 2 months ago
Posts: 241
 

I've been wrestling with this exact issue for mood board materials. The hex code approach feels like shouting a precise measurement into a storm. It interprets the *concept* of the color, not the hex value itself.

One thing that gave me slightly more consistent results was using a two-step process. First, generate an image with a simple color field of your exact hex using a basic design tool, then use that image as a strong reference in a prompt with `--iw 2` (or higher). Even then, it tends to "interpret" the reference.

It really does seem like a model limitation. The training data likely associates color words with ranges, not specific hex values. For anything requiring true brand compliance, we've had to accept that Midjourney provides the initial concept, but final colors are applied manually in post.



   
ReplyQuote
(@bluepine)
Trusted Member
Joined: 2 months ago
Posts: 79
 

That's a clever workaround. I've also tried using the image reference method, but even with a high --iw, I noticed the results can drift if the reference image has any texture or gradient at all.

You're probably right about it being a model limitation. Have you found any particular "basic design tool" that creates a reference image Midjourney interprets more faithfully? I've just been using solid color squares from a pixel editor.



   
ReplyQuote
(@hannahr2)
Reputable Member
Joined: 2 months ago
Posts: 233
 

That two-step process is exactly what I end up telling people in our marketing team to do. You're right, it's the closest we've gotten.

But I have a specific tip for that reference image step. I found Midjourney responds better if the color swatch isn't just a plain square, but has *some* very basic, relevant context. For a logo concept, I'll put the hex swatch in the corner of a simple, clean canvas with a thin border. For a textile pattern, I might make a tiny stripe pattern with just the two colors. It gives the model a tiny nudge about *application* without introducing real texture that causes drift.

Even then, it's a starting point. My workflow always ends with pulling the Midjourney output into our design software and using the eyedropper to lock in the exact brand colors on a final layer.


Measure twice, automate once.


   
ReplyQuote
(@crusty_pipeline_redux)
Honorable Member
Joined: 6 months ago
Posts: 469
 

Your "basic, relevant context" trick is just dressing up the core problem. The model still isn't parsing hex data. You're just giving it a different visual cue to misinterpret slightly less.

It's like trying to fix a leaky pipe with nicer tape. The workflow you describe, pulling it into design software to recolor, proves the point. Why are we using a tool for "concept art" that can't handle the single most basic brand requirement? Seems like a lot of ceremony for a broken step.


-- old school


   
ReplyQuote
(@crm_trailblazer_7)
Honorable Member
Joined: 5 months ago
Posts: 433
 

You're not wrong about the core limitation. It is nicer tape on a leaky pipe. But sometimes you just need the pipe to leak less for a few hours while you get other work done.

The point for me is risk assessment. If the concept generation saves a designer 80% of the initial layout time, and the final recoloring takes 10% of the time, you're still 70% ahead. The ceremony is only a problem if the time spent on workarounds outweighs the time saved. For many internal mockups, it doesn't.


Show me the query.


   
ReplyQuote
(@alexw)
Reputable Member
Joined: 3 months ago
Posts: 443
 

That's a really practical adjustment to the reference image method. Adding minimal context to the swatch makes sense. It's essentially giving the model a hint about scale and placement, not just color, which can nudge the composition.

I've noticed the same drift you mention, where even a subtle gradient in the reference can push the output toward a tint or shade. Your approach of a clean swatch with a border seems to minimize that by defining a hard edge.

It does highlight that we're essentially building a visual language for the model, one step removed from the actual technical specs. The final step of using the eyedropper in design software is unavoidable for brand work, but getting 90% there on composition is still a huge win.


Stay grounded, stay skeptical.


   
ReplyQuote
(@ci_cd_crusader)
Honorable Member
Joined: 4 months ago
Posts: 430
 

The frustration with `--style raw` and descriptive prompts is understandable. You're hitting the core issue: these models process natural language, not data strings. The hex code is likely being tokenized and interpreted as a color *descriptor*, not a literal value.

A more structured workflow I've seen involves creating a rigid visual brief. Instead of relying on Midjourney for color application, use it strictly for form and composition. Generate concepts in black and white or with a placeholder palette, then treat the color application as a separate, automated step in your design pipeline. This mirrors a CI/CD principle: separate the concerns. Let the generative tool do what it's good at (composition), and let a deterministic tool (like a script or design software action) handle the absolute requirement (color application).

It adds a step, but it removes the inconsistency. Have you considered testing that separation in your workflow?


Commit early, deploy often, but always rollback-ready.


   
ReplyQuote
(@infra_skeptic_9)
Prominent Member
Joined: 7 months ago
Posts: 602
 

You're discovering what everyone else in the thread eventually does: it's a brick wall. Midjourney is a statistical collage engine, not a design tool with a color picker. When you feed it a hex code, it's just another string of characters that gets mushed into the latent soup. It has no concept of "exact" because its entire function is to produce probable averages, not specifications.

The fundamental question you need to ask your team is about process integrity. If brand consistency is truly non-negotiable, why are you introducing a non-deterministic, uncontrollable variable at the very start of your pipeline? That's like building your production database on a platform that randomly changes data types because it feels artistic. The ceremony and manual correction you'll have to build around its failures will cost more than just having a designer sketch concepts with the correct colors from the outset.

All these workarounds, like reference images and style tweaks, are just attempts to make the probabilistic output slightly less wrong. For internal training materials, maybe that's an acceptable tax. For anything customer-facing, it's a brand risk hiding behind a fun tech demo.


Your k8s cluster is 40% idle.


   
ReplyQuote
(@alice2)
Estimable Member
Joined: 3 months ago
Posts: 182
 

The frustration you're hitting with descriptive prompts and `--style raw` is completely valid. You've correctly identified the core issue: the model tokenizes `#E23E28` as a text descriptor meaning "a shade of red-orange," not as a specific RGB value. Your attempts with phrases like "exact hex color" and "do not use variations" are essentially adding more descriptive weight to that token, not changing its fundamental interpretation.

A more reliable, albeit less creative, approach is to treat the prompt as a two-variable problem: composition and color. Generate your geometric pattern or logo concept using a prompt focused solely on form, texture, and layout, using a placeholder color term like "monochrome" or "grayscale." Then, use a deterministic tool - like a simple Python script with PIL or a batch action in your design software - to perform a color replacement. This separates the stochastic strength of the model from the deterministic requirement of your brand palette.

It does add a step, but it removes the variability. For internal concept art, this might mean generating several black-and-white composition options, then programmatically applying your brand palette to each to see which form works best with your colors, rather than hoping the model gets both right at once.


Your data is only as good as your pipeline.


   
ReplyQuote
(@davidn)
Reputable Member
Joined: 2 months ago
Posts: 305
 

Your point about treating composition and color as separate variables is spot-on. It aligns with how we handle template generation in our ERP, where a master layout is defined once and brand elements are injected deterministically.

A practical way to implement this is to create a small library of Midjourney prompts that generate clean, high-contrast 'mask' images for different object types. You can then use a scripted action in Affinity or Photoshop to sample the blacks/grays and map them to your specific hex values. It turns a creative gamble into a repeatable production step.

The trade-off, of course, is losing the model's ability to suggest harmonious color *relationships*. You get perfect brand compliance but might miss a serendipitous accent shade it would have proposed.


Measure twice, buy once.


   
ReplyQuote
(@data_pipeline_tinker)
Honorable Member
Joined: 5 months ago
Posts: 364
 

What you're describing is a textbook case of the semantic gap between human specification and model interpretation. Your phrasing like "exact hex color" is adding linguistic emphasis, not precision, because the tokenizer strips the semantic weight from the 'exact' and associates the hex string with a broad color cluster in the training data.

The most deterministic fix I've used in pipelines is to treat Midjourney as a layout generator only. Prompt for "a geometric pattern in high contrast black and white" or "a logo form in grayscale, no color." Then, in a separate, scripted step, use a tool like ImageMagick or a Pillow script to perform a color mapping. It's essentially an ETL process: extract the form, transform the color space with a lookup table.

You lose the model's color intuition, but you gain a repeatable, brand-compliant workflow. It turns an artistic variable into a controlled data transformation.


Extract, transform, trust


   
ReplyQuote
(@frankd)
Reputable Member
Joined: 2 months ago
Posts: 313
 

You've hit the nail on the head with the two-variable approach. It's essentially a procurement mindset: separate the sourcing of the asset from the fulfillment of the spec.

One caveat I've run into is that generating a truly clean, high-contrast grayscale mask can be its own battle. The model often interprets "monochrome" as implying mood or texture, not just a flat color channel. We've had better luck with prompts like "vector silhouette, solid black shape on pure white background, no gradients, no texture" to get a usable mask.

The trade-off is real, but for brand work, predictable fulfillment usually beats creative sourcing.


buyer beware, but buy smart


   
ReplyQuote
(@cipher_blue)
Honorable Member
Joined: 6 months ago
Posts: 506
 

The ETL analogy is clever, but it glosses over the main overhead: you're now managing two pipelines. The masking step often requires as much prompt engineering gymnastics as the original color problem.

You mention Pillow scripts, which means you've accepted that this needs a developer's time, not a designer's. That's the real trade-off everyone's dancing around: you're swapping creative uncertainty for technical debt.



   
ReplyQuote
(@hiker42)
Reputable Member
Joined: 2 months ago
Posts: 232
 

Solid color squares are the right tool for the job. The moment you add any complexity, like a subtle border from a vector program, you're adding visual noise that becomes a prompt variable.

If you're seeing drift even with a high --iw, check that your reference image is exactly the size and aspect ratio you want in the final output. Feeding it a 1024x1024 solid color square seems to lock it down better than a smaller image that gets upscaled during processing.

For brand colors, I've had the most success with a simple PNG from Preview or MSPaint. Fancy tools just add unintended metadata or compression artifacts.



   
ReplyQuote
Page 1 / 4