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

Parameters of gradient.presets.stop
NameTypeRequiredDescription
action"add" | "move" | "delete" | "color" | "opacity"no
backgroundColorstringnoThe background color the command uses, "#rrggbb", for this call only; the current background color by default.
coalescestringnoMerges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one.
color"#rrggbb" | "foreground" | "background"noadd: default the colour there
foregroundColorstringnoThe foreground color the command uses, "#rrggbb", for this call only; the current foreground color by default.
indexintegernostop number
kind"color" | "opacity"no
locationnumberno0 to 1
opacityintegerno0 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.