Generate on a key color in Stable Diffusion (SDXL)
SDXL is the one tool here with a negative prompt it really honors, so the work splits in two. The positive field describes the flat background; the negative field bans the habits that would soften it.
The prompt
The subject is a red fox sitting, flat cartoon style. Nothing in that is blue or purple and there are no plants in it, so it takes blue, the default. A red fox is orange-red pigment, nowhere near #0000FF, and the two never touch.
red fox sitting, flat cartoon style, isolated on a completely flat, uniform, solid pure blue (#0000FF) digital chroma-key background. The pure blue background fills the image edge to edge like a flat digital chroma-key screen with no gradient, staying at full brightness inside every gap and opening in the subject; no reflection or tint of pure blue on the subject. Every edge of the subject is crisp, sharp and hard against the pure blue, with no soft, blurry, feathered or glowing transitions, no depth-of-field blur, no haze or halo; inside every hole and gap the pure blue stays at full brightness right up to the edge. Shaded parts of the subject keep their own natural color, never a pure blue tint. The entire subject is centered and completely inside the frame with at least 10% empty background margin on every side, nothing cropped or touching the image edges. No frame, no border, no paper, no mockup, no vignette, no text, no watermark, no deformed or duplicated parts. No floating or detached fragments, no stray specks, dust or debris anywhere on the background; every element is physically attached to the subject.
The negative list, pasted into the negative field, unchanged:
gradient, vignette, shadow, reflection, bokeh, depth of field, blur, glow, halo, haze, texture, text, watermark, frame, border
In AUTOMATIC1111 the two boxes are stacked in the txt2img tab, positive on top, negative directly beneath. In ComfyUI they are the two CLIP Text Encode nodes wired to the sampler’s positive and negative inputs. Full sentences go in the positive one exactly as written; the comma list goes in the other.
If the cut says the key color is inside the subject
Some checkpoints sneak blue into cast shadows. Re-render on red, with the same negative list:
red fox sitting, flat cartoon style, isolated on a completely flat, uniform, solid pure red (#FF0000) digital chroma-key background. The pure red background fills the image edge to edge like a flat digital chroma-key screen with no gradient, staying at full brightness inside every gap and opening in the subject; no reflection or tint of pure red on the subject. Every edge of the subject is crisp, sharp and hard against the pure red, with no soft, blurry, feathered or glowing transitions, no depth-of-field blur, no haze or halo; inside every hole and gap the pure red stays at full brightness right up to the edge. Shaded parts of the subject keep their own natural color, never a pure red tint. The entire subject is centered and completely inside the frame with at least 10% empty background margin on every side, nothing cropped or touching the image edges. No frame, no border, no paper, no mockup, no vignette, no text, no watermark, no deformed or duplicated parts. No floating or detached fragments, no stray specks, dust or debris anywhere on the background; every element is physically attached to the subject.
Corners and CFG
SDXL’s signature failure is corner shading. Left alone it lights the backdrop like a wall, brightest behind the subject and falling off toward the edges, so the corners end up a different blue from the center and survive the cut as haze. Two things hold it flat: “flat digital chroma-key screen” in the positive text, and gradient plus vignette sitting in the negative list.
CFG between 5 and 7 is enough. Pushing CFG when the background drifts is tempting and backfires, because high CFG oversaturates the key and bleeds its tint into the subject’s shadows, and a tinted shadow is exactly what makes the cut eat parts of your fox. If the background misbehaves at CFG 6, change the seed or the checkpoint before touching the scale.
When gaps stay foggy
Some checkpoints keep shading enclosed spaces, between the tail and the body, under the chin, whatever the negative field says. The fix is attention weighting on the background phrase: write (solid pure blue background:1.3) in the positive prompt. Both AUTOMATIC1111 and ComfyUI parse that syntax. Go up in steps of 0.1, and stop before 1.5, where the weighting starts flattening the subject’s own colors, which is a worse problem than the fog was.
Which key to pick, and what each sentence in the block is for, is on the guide.
Use it on your own subject
The prompt above is one subject. For anything else, keep your own wording and paste this block on the end of it.
Isolated on a completely flat, uniform, solid pure blue (#0000FF) digital chroma-key background. The pure blue background fills the image edge to edge like a flat digital chroma-key screen with no gradient, staying at full brightness inside every gap and opening in the subject; no reflection or tint of pure blue on the subject. Every edge of the subject is crisp, sharp and hard against the pure blue, with no soft, blurry, feathered or glowing transitions, no depth-of-field blur, no haze or halo; inside every hole and gap the pure blue stays at full brightness right up to the edge. Shaded parts of the subject keep their own natural color, never a pure blue tint. Everything in sharp focus with deep depth of field, evenly lit with soft neutral studio light, no cast shadow, no contact shadow, no ambient occlusion, no bounce light. The entire subject is centered and completely inside the frame with at least 10% empty background margin on every side, nothing cropped or touching the image edges. No frame, no border, no paper, no mockup, no vignette, no text, no watermark, no deformed or duplicated parts. No floating or detached fragments, no stray specks, dust or debris anywhere on the background; every element is physically attached to the subject.
Then cut them out
Export PNGs at the resolution you rendered and drop them into ClipBrook. Your images stay on your computer. Nothing is uploaded. The background is measured off each image’s own border, so checkpoint-to-checkpoint drift in the exact blue does not matter, and every file comes back as a PNG with a transparent background.