save_palette
Persist a named color palette for later retrieval with get_palette or list_palettes. Each entry in colors accepts what every other tool accepts: a hex (#d2bc93), a CSS name (red), an RNV brand name (brand gold), or a saved-palette reference ('Spring line:2'); each is resolved and stored as normalized hex, and an unknown token refuses the whole save naming its position. Optional notes are stored as the palette's description. Author is recorded as RNVizion. The name is refused, with the reason, if it is an RNV brand name, a CSS color name, a 'css:' form, a hex literal, or contains ':' -- a palette resolves ahead of brand and CSS names, so such a name would redefine a color for every caller. This WRITES to the palette store and is the only tool here that does. Reusing an existing name overwrites that palette: save and update are the same call (an upsert), there is no separate update operation. Returns a durable flag: true if the palette reached durable storage (the HF Dataset) and will survive a restart, false if it saved to the local working copy only (which is lost on rebuild), with durable_reason naming the step that stopped it. Use when the user wants to keep a set of colors under a name for reuse across sessions, such as a brand or launch palette; to read a palette back use get_palette, and to see what already exists use list_palettes. The saved name can then be passed to mix_colors, convert_color, and generate_harmony as a palette reference.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"colors": "<colors>"
},
"name": "save_palette"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Unique key the palette is stored under. Reusing an existing name overwrites that palette (upsert). Can be referenced later by other tools as 'name:index', e.g. 'Spring line:2'. Refused, with the reason, if it is an RNV brand name, a CSS color name, a 'css:' form, a hex literal, or contains ':'. | |
| notes | No | Optional human-readable description stored as the palette's notes. | |
| colors | Yes | Ordered list of colors. Each accepts what every other tool accepts: a hex ('#d2bc93'), a CSS name ('red'), an RNV brand name ('brand gold'), or a saved-palette reference ('Spring line:2'); each is resolved and stored as normalized '#rrggbb'. An unknown token refuses the whole save, naming the position. Order is preserved; at least one required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name the palette was stored under. | |
| notes | Yes | Description stored on the palette; empty if none given. | |
| colors | Yes | The hex colors saved, in order, normalized to '#rrggbb'. | |
| durable | Yes | True if the palette was written through to the durable HF Dataset and will survive a Space rebuild; False if it saved to the local working copy only (e.g. the Space HF_TOKEN is missing or lacks write scope), meaning it will be lost on the next restart. | |
| color_count | Yes | Number of colors in the saved palette. | |
| overwritten | Yes | True if a palette with this name already existed and was replaced; False if newly created. | |
| durable_reason | Yes | Empty when durable is true. Otherwise names the step that stopped durability: no token, the Dataset could not be reached or hydrated at startup, or the push failed. A false flag with no reason is a shrug; this is the reason. |