Export palette as code
export_paletteExport a palette as CSS custom properties or a JavaScript object, with each colour named after its nearest named colour. Output matches Coolours' own Export feature. create_palette_link already returns the CSS; use this for the JS object, or for a palette you didn't create. Use the output as given: its names match the Coolours UI.
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": {
"colours": "<colours>",
"format": "<format>"
},
"name": "export_palette"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | Yes | ||
| colours | Yes | Colours in display order. Hex ("#1E293B", "#abc"), rgb() or CSS colour names. No transparency. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |