Create colors
create_colorsAdd colour swatches to a Playbook board — the building blocks of a palette or a brand's colour spec. Send two or more codes and Playbook merges them into a palette (a group asset), returned as group; send one and group comes back null. A colour is a hex code ("#FF0000", "#F00"), CMYK ("CMYK(0%, 100%, 100%, 0%)"), a two-stop gradient ("#FF0000\u2192#0000FF"), or a Pantone name written WITHOUT the "PANTONE " prefix, exactly as it appears in Playbook's Pantone list — "185 C", not "PANTONE 185 C". Anything else is rejected with 406. Returns the finished swatches immediately (nothing is uploaded, so there is no polling step). Requires a token with the write scope. Tip: validate collection_token with get_board first — an unknown token silently falls back to an anonymous default board.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| titles | No | Optional titles, positionally aligned with color_codes. A null entry falls back to the code itself. | |
| color_codes | Yes | 1-100 colours per call. Each is a hex code ("#FF0000", "#F00"), CMYK ("CMYK(0%, 100%, 100%, 0%)"), a two-stop gradient of two hex codes joined by → ("#FF0000\u2192#0000FF"), or a Pantone name with no "PANTONE " prefix and exact casing ("185 C", "185 CP", "20-0001 TPM"). An unrecognized value fails the whole call with 406 — nothing is created. | |
| organization | No | Workspace slug, as returned by list_organizations. Omit it when the account has a single workspace — it is then resolved from your token. Pass it only when the account has several, or when you mean a workspace other than the obvious one. | |
| parent_token | No | Merge the new swatches into this existing asset or group instead of letting them form a palette of their own. | |
| collection_token | No | Destination board token. If omitted or unknown, Playbook silently routes to a default anonymous board — call get_board first to validate. |