Style Codes (Sref Codes)
A style code is a compact text string of numbers or characters that tells an image generator to apply a specific, pre-mapped aesthetic without needing an uploaded image reference. In Midjourney, these appear as numerical seeds following the sref parameter, while platforms like Ideogram manage them through eight-character hexadecimal values. Using a code allows creators to reproduce an identical artistic atmosphere across completely unrelated subjects.
Also known as: style codes, --sref random, sref codes, style_codes
Side-by-side test results



Model: Ideogram 3.0 (przez API fal.ai, tryb TURBO). Settings: seed 1411, prompt expansion disabled, style code is the only variable. Date: 14.11.2026.
Prompt: illustration of a small mountain hut in winter, snow, pine trees, smoke from the chimney
Without a code, I received a simple, flat illustration. Inputting code 3F7A2C91 yielded a painterly violet night mood, while code 7C1D9A55 produced a warm scene with figures standing in front of the house that were never specified in my prompt. Using random codes is a lottery: it shifts more than just color palettes and can inject extra visual content, which forced me to discard a third test run when the code planted a random person squarely in the foreground.
Syntax across generators
| Generator | Parameter | Values | Default |
|---|---|---|---|
| Midjourney* | --sref <numeric code> / --sref random--sw działa też z kodami. --sref random z permutacja/repeat/Draft V8.1 daje różny kod dla każdego obrazu | numeric codes | - |
| Ideogram | style_codesIdeogram 3.0. Does not combine with style_preset | list of 8-character hexadecimal codes | - |
| FLUX | no such parameter | - | - |
| GPT Image | no such parameter | - | - |
| Stability AI (SD 3.5) | no such parameter | - | - |
* Midjourney: docs.midjourney.com blocks automated scrapers, so values are sourced from search engine indexes. Please verify settings on the official Midjourney site before production use.
- Sources, verified on 14.11.2026:
- Midjourney: docs.midjourney.com/hc/en-us/articles/32180011136653-Style-...
- Ideogram: developer.ideogram.ai/v2/api-reference/images/generate/ideo...
- FLUX: docs.bfl.ml/api-reference/utility/generate-an-image-with-fl...
- GPT Image: developers.openai.com/api/docs/guides/image-generation
- Stability AI: docs.stability.ai/api-reference/generate/stable-diffusion-3...
When to use it
- When you find an aesthetic you love and want to reuse it repeatedly using a simple text string
- When coordinating creative assets across marketing or design teams, where sharing a short code via Slack or email is cleaner than managing image files
- When prototyping a brand look, making sure to test the code across two or three diverse prompts before committing to a larger production run
Common mistake
Treating a style code like a subtle color filter is a widespread mistake. A code captures an entire artistic sensibility, meaning it can alter camera framing, textures, and even introduce unexpected background people. Another frequent misstep is copying code lists from community forums without verifying model compatibility, as an updated generator engine can interpret an older code in an entirely different way.
Ready-to-use example
Midjourney: mountain cabin --sref 1234567890 Midjourney (random code exploration): mountain cabin --sref random Ideogram (API call): "style_codes": ["3F7A2C91"]
Frequently asked questions
How do I discover new sref codes in Midjourney?
Add --sref random to the end of your prompt. When the system generates a result with an aesthetic you like, open the image details or check the generation text to copy the numerical code it assigned.
Can I combine multiple style codes in one prompt?
Yes. Most generators that support style codes let you list multiple entries separated by spaces, blending the artistic attributes of each into a single hybrid look.
Do style codes work across different image generation platforms?
No, style codes are engine-specific. A numerical sref code native to Midjourney will not work inside Ideogram or another tool, as each platform indexes its latent aesthetic space using proprietary methods.
Why does a saved style code suddenly produce different results?
Style codes rely directly on the underlying generative model. If the platform updates its core algorithm, the mathematical meaning of that specific code changes, resulting in a fresh visual style.
