---
title: "gradient.presets.edit: Edit Gradient Presets — Photo kit command — Kition"
description: "Edits the preset library (`action`: rename, delete, move, newGroup, renameGroup, deleteGroup on `preset`/`group`); app-wide, not the document."
canonical: "https://developer.kition.ai/docs/kits/photo/commands/gradient.presets.edit"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/photo/commands/gradient.presets.edit](https://developer.kition.ai/docs/kits/photo/commands/gradient.presets.edit)

# gradient.presets.edit

**Edit Gradient Presets.** Edits the preset library (`action`: rename, delete, move, newGroup, renameGroup, deleteGroup on `preset`/`group`); app-wide, not the document.

- Kit: Photo 0.1.0 (PSD, PSB, or .kphoto); reference: [Photo kit commands](https://developer.kition.ai/docs/kits/photo.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `action` | `"rename" \| "delete" \| "move" \| "newGroup" \| "renameGroup" \| "deleteGroup"` | no |  |
| `coalesce` | `string` | no | Merges consecutive edits with the same key into one undo step, as a slider drag or a typing session is one. |
| `group` | `string` | no | narrows the lookup; the group for renameGroup/deleteGroup |
| `index` | `integer` | no | move |
| `name` | `string` | no | rename: new name; newGroup/renameGroup: group name |
| `preset` | `string \| string[]` | no | name\|[names] (rename/delete/move); rename/delete/move |
| `to` | `string` | no | group (move); move |

## Call through photo_run

```text
photo_run {
  "path": "<file>.psd",
  "steps": [{ "command": "gradient.presets.edit" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `action`, `coalesce`, `group`, `index`, `name`, `preset`, `to`. 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": [
        "rename",
        "delete",
        "move",
        "newGroup",
        "renameGroup",
        "deleteGroup"
      ],
      "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"
    },
    "group": {
      "description": "narrows the lookup; the group for renameGroup/deleteGroup",
      "type": "string"
    },
    "index": {
      "description": "move",
      "type": "integer"
    },
    "name": {
      "description": "rename: new name; newGroup/renameGroup: group name",
      "type": "string"
    },
    "preset": {
      "description": "name|[names] (rename/delete/move); rename/delete/move",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      ]
    },
    "to": {
      "description": "group (move); move",
      "type": "string"
    }
  },
  "type": "object"
}
```

Generated from the command list of @kition/photo-darwin-arm64@0.1.0 and the kit itself (photo_commands through @kition/cli@0.1.1, built from KitionAI/kition-photo@abe3f30).
