photoshop_recipe_remove_background
Removes a photo background non-destructively by creating a layer mask from Select Subject, with color-range fallback for studio shots. Keeps original pixels intact and wraps the edit in one undo step.
Instructions
One-shot background removal: Select Subject by default, with an automatic Color Range fallback for uniform/high-key studio backgrounds (product-on-white). Attaches a layer mask (source pixels kept). Wrapped in a single undoable history step.
Users often say: cut out, isolate subject, remove background, transparent background, arka planı sil.
Use when: the user wants the subject isolated from the background non-destructively. Do NOT use when: the subject is extremely fine-edged (hair against a busy background) — propose a manual Refine Edge pass afterwards.
Returns: { ok, summary, undo_history_states_consumed, details.method = select_subject | color_range_fallback }.
Preconditions: PS ≥ 23 (Select Subject v2) for the default path; Color Range fallback still runs on uniform studio shots if Select Subject is loose or empty. Side effects: attaches a pixel mask to the active layer; no pixels destroyed; one undo reverts everything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| feather_px | No | Edge feather in pixels (0-20). 0 = hard edge (default for product shots), 1-3 = soft edge for portraits. | |
| document_id | No | Optional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool activates that document before running so a UI tab switch cannot retarget the edit. | |
| keep_shadow | No | Reserved for a future iteration; currently recorded in the response but no shadow layer is created yet. | |
| use_generative | No | After masking, run generative edge cleanup on inverted background selection (default false) |