Photo kit command

select.magicWand

Magic Wand

Selects contiguous (or all) pixels similar in color to the one at `x`, `y` within `tolerance`.

Kit
Photo 0.1.0 (PSD, PSB, or .kphoto)
Changes the document
no

Parameters

Parameters of select.magicWand
NameTypeRequiredDescription
antiAliasbooleanno
coalescestringnoMerges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one.
contiguousbooleanno
mode"replace" | "add" | "subtract" | "intersect"no
sampleAllLayersbooleanno
toleranceintegerno0 to 255
xnumbernopixels
ynumbernopixels

Call through photo_run

text
photo_run {
  "path": "<file>.psd",
  "steps": [{ "command": "select.magicWand" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: antiAlias, coalesce, contiguous, mode, sampleAllLayers, tolerance, x, y. photo_run answers the step’s result in completed[i].result.

Result

Result of select.magicWand
NameTypeRequiredDescription
selectedbooleanno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "selected": {
      "type": "boolean"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "antiAlias": {
      "default": true,
      "type": "boolean"
    },
    "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"
    },
    "contiguous": {
      "default": true,
      "type": "boolean"
    },
    "mode": {
      "default": "replace",
      "enum": [
        "replace",
        "add",
        "subtract",
        "intersect"
      ],
      "type": "string"
    },
    "sampleAllLayers": {
      "default": false,
      "type": "boolean"
    },
    "tolerance": {
      "default": 32,
      "description": "0 to 255",
      "type": "integer"
    },
    "x": {
      "description": "pixels",
      "type": "number"
    },
    "y": {
      "description": "pixels",
      "type": "number"
    }
  },
  "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.