MCP ToolsParameters
set_colors
Update the runtime color palette values of a sketch's current state.
Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
sketchId | string | yes | ID of the sketch to update |
colors | Record<string, string> | yes | Color key-value pairs to set (hex strings) |
Output Shape
{
"success": true,
"sketchId": "noise-grid",
"updated": ["bg", "accent"],
"colorPalette": ["#0A0F1C", "#22D3EE"]
}Side Effects
- Updates sketch state.colorPalette in memory
- Saves sketch to disk
- Sends
sketch:updatedsidecar notification
Error Cases
| Condition | Error |
|---|---|
| No workspace open | "No workspace is currently open" |
| Unknown sketch ID | "Sketch not found: 'bad-id'" |
| Unknown color key | "Unknown color: 'foo'. Valid keys: bg, accent" |
| Invalid hex color | "Invalid hex color for 'bg': 'not-a-color'" |
Golden Path Example
Request:
{ "sketchId": "noise-grid", "colors": { "bg": "#0A0F1C" } }Response:
{
"success": true,
"sketchId": "noise-grid",
"updated": ["bg"],
"colorPalette": ["#0A0F1C"]
}