Photo kit command
gradient.presets.stop
Edit Gradient Stop
Edits one color or opacity stop of the current gradient (`action`, `kind`, `index`, `location`, `color`).
- Kit
- Photo 0.1.0 (PSD, PSB, or .kphoto)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
action | "add" | "move" | "delete" | "color" | "opacity" | no | |
backgroundColor | string | no | The background color the command uses, "#rrggbb", for this call only; the current background color by default. |
coalesce | string | no | Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one. |
color | "#rrggbb" | "foreground" | "background" | no | add: default the colour there |
foregroundColor | string | no | The foreground color the command uses, "#rrggbb", for this call only; the current foreground color by default. |
index | integer | no | stop number |
kind | "color" | "opacity" | no | |
location | number | no | 0 to 1 |
opacity | integer | no | 0 to 100 |
Call through photo_run
text
photo_run {
"path": "<file>.psd",
"steps": [{ "command": "gradient.presets.stop" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: action, backgroundColor, coalesce, color, foregroundColor, index, kind, location, opacity. photo_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
json
{
"additionalProperties": false,
"properties": {
"action": {
"enum": [
"add",
"move",
"delete",
"color",
"opacity"
],
"type": "string"
},
"backgroundColor": {
"description": "The background color the command uses, \"#rrggbb\", for this call only; the current background color by default.",
"type": "string"
},
"coalesce": {
"description": "Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one.",
"type": "string"
},
"color": {
"description": "add: default the colour there",
"enum": [
"#rrggbb",
"foreground",
"background"
],
"type": "string"
},
"foregroundColor": {
"description": "The foreground color the command uses, \"#rrggbb\", for this call only; the current foreground color by default.",
"type": "string"
},
"index": {
"description": "stop number",
"type": "integer"
},
"kind": {
"default": "color",
"enum": [
"color",
"opacity"
],
"type": "string"
},
"location": {
"description": "0 to 1",
"type": "number"
},
"opacity": {
"description": "0 to 100",
"type": "integer"
}
},
"returns": "{\"current\"}. Edits the Gradient tool's current gradient (no layer, midpoints stay centred).",
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (photo_commands through @kition/[email protected], built from KitionAI/kition-photo@abe3f30). As data: commands.jsonl.