photoshop_fill_gradient
Paint a two-color linear gradient across the active layer's pixels, choosing start and end RGB colors plus direction to create color blends or ramps.
Instructions
Paint a two-color linear gradient on the active layer pixels.
Use when: the user asks for a color gradient, blend, or "mavi yeşil" style ramp on a layer. Do NOT use when: a flat color is enough — use photoshop_fill_layer. Do NOT use when: the gradient should fade the layer into the background — use photoshop_recipe_gradient_fade. Do NOT use when: you would write ExtendScript. Document.gradients does not exist.
Returns: the two colors and direction applied. Preconditions: active document and an unlocked non-text layer. Side effects: overwrites those pixels, one history step. The same colors on the same pixels are idempotent. Reversible with photoshop_undo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| toRed | Yes | End red (0-255) | |
| toBlue | Yes | End blue (0-255) | |
| fromRed | Yes | Start red (0-255) | |
| toGreen | Yes | End green (0-255) | |
| fromBlue | Yes | Start blue (0-255) | |
| direction | No | Gradient axis. Default left_to_right. | |
| fromGreen | Yes | Start green (0-255) | |
| document_id | Yes | Photoshop document id from photoshop_get_state / photoshop_list_documents. Send null or 0 to use the active document. A positive number activates that document before the tool runs. When no document is open, a stale id does not block the call. |