Change to a solid colour background
Replace the background with one opaque #RRGGBB colour, forcing alpha=255 per pixel; semi-transparent edges blend by effective alpha so no accidental transparent pixel remains.
Inputs and parameters
file— Choose image (PNG/JPEG/WebP, ≤15 MiB / 16 MP)color— Background colour (#RRGGBB, must be opaque)sample— Fixed sampleformat— Export formatedits— Mask edits JSON (optional)undo— Undo stepsredo— Redo steps
Real example
sample=product-white (4×3 white-background product, mask [0,0,0,0,0,128,255,0,0,255,128,0]); color=#FFFFFF; op=change-background; format=png.
→ PNG 4×3, 119 bytes, named cutout-change-background-20261115T000000Z.png; all 12 pixels have alpha=255, mask=0 pixels are RGB (255,255,255), maskHash=5ac8db63.
Limits and failure handling
One opaque solid colour only (#RRGGBB); no gradient or image backgrounds; 15 MiB / 16 MP budget. Semi-transparent edges use rounded integer blending, not floating-point GPU compositing; real WebGPU/WASM inference and browser Canvas encoding are untested. Model download retries 3 times, cancel leaves no task; hot cache keys are url@revision so a revision change cannot reuse a stale weight.
FAQ
Why is #RRGGBBAA rejected?
A solid background promises opacity; a hex value whose alpha byte is not FF returns TRANSLUCENT_BACKGROUND to avoid accidental transparency. Use “Remove background” for transparency.
Does the background change resize the image?
No pixel resizing; only EXIF orientation alignment (e.g. Orientation=6 turns 4×3 into 3×4). Output reports the actual size; original-size export does not imply full-resolution inference.