# clip.set_color

> Grades a clip: basic colour, LUT, HSL, wheels and curves.

Source: https://stuarty.com/docs/mcp/tools/edit/clip.set_color/

Sets the given adjustments, rounded to 3 decimals; a value equal to the default (brightness 0, contrast 1, saturation 1, temperature 0, tint 0, hue 0) clears the stored one. Positive temperature is warmer, positive tint is more magenta, hue rotates the colours in degrees. lut_asset is the id of a lut asset (a .cube file) and lut_intensity how much of it is mixed in, 0 to 1, default 1; lut_intensity 0 removes the lookup table. hsl bands (red, orange, yellow, green, cyan, blue, purple, magenta: hue, saturation, lightness, -1 to 1), wheels (shadows, midtones, highlights: hue 0 to 360, amount 0 to 1, luma -1 to 1) and curves (master, red, green, blue: 2 to 8 points of x and y from 0 to 1) each replace what they name and a neutral one removes it.

## Arguments

| Argument | Type | Required | Notes |
| --- | --- | --- | --- |
| `brightness` | `number` | no | -1 to 1; default 0.; min -1; max 1 |
| `contrast` | `number` | no | 0 to 2; default 1.; min 0; max 2 |
| `curves` | `object` | no | Tone curves: master, red, green, blue. |
| `hsl` | array of `object` | no | Bands of colour ranges, up to 8; a given range replaces its band, a neutral band removes it. |
| `hue` | `number` | no | -180 to 180 degrees; default 0.; min -180; max 180 |
| `item_id` | `string` | yes | A clip.; pattern `^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$` |
| `lut_asset` | `string` | no | Id of a lut asset to grade the clip with.; pattern `^ast_[0123456789abcdefghjkmnpqrstvwxyz]{10}$` |
| `lut_intensity` | `number` | no | 0 to 1; default 1; 0 removes the lookup table.; min 0; max 1 |
| `saturation` | `number` | no | 0 to 2; default 1.; min 0; max 2 |
| `temperature` | `number` | no | -1 (cooler) to 1 (warmer); default 0.; min -1; max 1 |
| `tint` | `number` | no | -1 (greener) to 1 (more magenta); default 0.; min -1; max 1 |
| `wheels` | `object` | no | Colour wheels of shadows, midtones and highlights. |

## Errors

- [`E_VALIDATION`](/docs/reference/error-codes#e_validation)
- [`E_NOT_FOUND`](/docs/reference/error-codes#e_not_found)
- [`E_TYPE_MISMATCH`](/docs/reference/error-codes#e_type_mismatch)
- [`E_INVALID_STATE`](/docs/reference/error-codes#e_invalid_state)

## Scope

Scope `edit`. The scope is the one an API key needs in network mode. Run `stuarty command:help clip.set_color` for the same description from the binary, or call the [`command_help`](/docs/mcp/tools/command_help) tool.

## Next steps

- [The edit tool](/docs/mcp/tools/edit)
- [Batches, revisions and idempotency](/docs/agents/batches)

**As an MCP call**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "edit",
    "arguments": {
      "project_id": "prj_7k2m9x4q1b",
      "base_revision": 12,
      "operations": [
        {
          "op": "clip.set_color",
          "args": {
            "brightness": 0.1,
            "item_id": "itm_m1n2p3q4r5",
            "temperature": 0.3
          }
        }
      ]
    }
  }
}
```

**As a batch file for the CLI**

```json
[
  {
    "op": "clip.set_color",
    "args": {
      "brightness": 0.1,
      "item_id": "itm_m1n2p3q4r5",
      "temperature": 0.3
    }
  }
]
```

```bash
stuarty edit --project prj_7k2m9x4q1b --ops batch.json --json
```

**Over HTTP**

```bash
curl -X POST "http://127.0.0.1:7878/api/v1/projects/prj_7k2m9x4q1b/edit" \
  -H "Authorization: Bearer $STUARTY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "base_revision": 12,
  "operations": [
    {
      "op": "clip.set_color",
      "args": {
        "brightness": 0.1,
        "item_id": "itm_m1n2p3q4r5",
        "temperature": 0.3
      }
    }
  ]
}'
```

The ids in the example are illustrative: read the real ones with `project_get`.
