Generate Chart Palette
palette.generate
Overview
When none of our reviewed palettes fit your constraints, ask us to create one new palette from clear preferences — distinct series colours or a continuous scale. Each call creates a fresh palette and returns a recovery seed; keep only that seed and palette.replay gives you exactly the same colours back. The result passed our contrast checks, but it is not a reviewed Squillify library palette. Prefer palette.recommend first. Max input 8192 bytes.
Sometimes you need colours our reviewed library cannot satisfy, and a single seed you can keep to get them back later.
Reliability
STRICT validation, random by design: the same preferences produce a fresh palette on every call, and the seed we return is what makes one of them repeatable — send it to palette.replay. Domain errors (not retryable — fix the input; unchanged input will fail again): PALETTE_COUNT_REQUIRED (kind=categorical without count — pass count 2..8); PALETTE_UNSUPPORTED_COUNT (count outside the range for the kind you asked for — 2..8 series colours, 2..32 stops); PALETTE_KIND_UNSUPPORTED (center sent for a kind that has no midpoint, or unknown kind — remove center, or fix kind); PALETTE_TARGET_UNSUPPORTED (target belongs to the other shape — leave it out and kind decides, or send generic to take the colours without chart tokens); PALETTE_GENERATION_EXHAUSTED (nothing we built met your contrast, grayscale, hue, or anchor requirements — relax intensity, hues, anchors, or accessibility); PALETTE_VALUE_INVALID (malformed intent, anchors, avoid, accessibility, direction, or an unknown center value; avoid with kind=cyclical; or a seed sent here instead of to palette.replay — correct the value).
Context footprint
Returns one palette object plus a replay envelope whose seed is enough on its own to reproduce the colours. No chart image is rendered. A successful call costs 1 execution credit.
When to use it
palette.recommend cannot meet your constraints and you need one new palette with a recovery seed.
You want a reviewed Squillify palette — use palette.recommend or palette.get. You already have a seed — use palette.replay.
Scope
Non-goals
- Does not replace palette.recommend when a reviewed library palette is enough
- Does not replay a seed — that is palette.replay
- Does not mark the result as a reviewed Squillify library palette
- Does not add the result to our shared palette library
- Does not draw or restyle a chart — you apply the returned colours
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
How we handle your data
What this means
This skill may receive sensitive content, but it does not target sensitive data and returns only a structured non-sensitive result.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response does not contain submitted content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| kind | string | Yes | Which colour-set family to generate or look up. |
| count | integer | No | How many colours to return, 2 through 8 for categorical and 2 through 32 stops for a continuous ramp. Required for kind=categorical; omit it on a continuous kind to get the ramp's own stops. |
| surface | string | Yes | Chart background the colours were checked against. |
| intent | object | No | Closed colour preferences with optional intensity, temperature and huePreference; omit the whole object for balanced defaults. |
| anchors | array | No | Colour anchors, 0 through 4 closed {color, role} objects; omit it or send [] when you have no anchors. |
| avoid | array | No | Things to keep out, 0 through 8 hue families or #RRGGBB colours; omit it or send [] when nothing is ruled out. Not accepted with kind=cyclical. |
| accessibility | object | No | Closed readability requirements the generator builds to: colorVision, print and optional minimumSurfaceContrast; omit the whole object for default checks only. |
| center | string | No | Where a diverging ramp is centred; omit it for zero on diverging palettes. Rejected for other kinds. |
| direction | string | No | Colour order; omit it for normal. |
| target | string | No | Where the colours will be applied: chart_series, color_gradient or generic; omit it so the palette's own shape chooses. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| replay | object | Yes | Closed recovery envelope with the seed to keep, how it was issued, the canonical request baked into it and that request's digest. |
| palette | object | Yes | Closed ready-to-apply palette with provenance, kind, model, surface, colours, optional gradient stops, application tokens, evidence and warnings. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"palette.generate","input":{"kind":"categorical","count":6,"surface":"light","intent":{"temperature":"cool","huePreference":["blue","teal"]}}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("palette.generate", {"kind":"categorical","surface":"light","intent":{"temperature":"cool","intensity":"restrained","huePreference":["blue","teal"]},"count":6});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
| PALETTE_GENERATION_EXHAUSTED | 412 | No | The input is valid but cannot be processed as-is. |
| PALETTE_COUNT_REQUIRED | 400 | No | The request payload failed this skill's input validation. |
| PALETTE_UNSUPPORTED_COUNT | 400 | No | The request payload failed this skill's input validation. |
| PALETTE_KIND_UNSUPPORTED | 400 | No | The skill does not support the requested variant. |
| PALETTE_TARGET_UNSUPPORTED | 400 | No | The skill does not support the requested variant. |
| PALETTE_VALUE_INVALID | 400 | No | The request payload failed this skill's input validation. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not replace palette.recommend when a reviewed library palette is enough
- Does not replay a seed — that is palette.replay
- Does not mark the result as a reviewed Squillify library palette
- Does not add the result to our shared palette library
- Does not draw or restyle a chart — you apply the returned colours
- Default colour choice when a reviewed palette exists — use palette.recommend
- Getting a palette you already generated back — use palette.replay
- Claiming brand-approved or editorial tone suitability
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "palette.generate",
"input": {
"kind": "categorical",
"surface": "light",
"intent": {
"temperature": "cool",
"intensity": "restrained",
"huePreference": [
"blue",
"teal"
]
},
"count": 6
}
}Examples
Cool restrained six-series palette on light
{
"kind": "categorical",
"surface": "light",
"intent": {
"temperature": "cool",
"intensity": "restrained",
"huePreference": [
"blue",
"teal"
]
},
"count": 6
}{
"replay": {
"seed": "sqg.eyJlIjoiMTAxMTEyMTMxNDE1MTYxNzE4MTkxYTFiMWMxZDFlMWYiLCJyIjp7ImNvdW50Ijo2LCJpbnRlbnQiOnsiaHVlUHJlZmVyZW5jZSI6WyJibHVlIiwidGVhbCJdLCJpbnRlbnNpdHkiOiJyZXN0cmFpbmVkIiwidGVtcGVyYXR1cmUiOiJjb29sIn0sImtpbmQiOiJjYXRlZ29yaWNhbCIsInN1cmZhY2UiOiJsaWdodCIsInRhcmdldCI6ImNoYXJ0X3NlcmllcyJ9fQ",
"seedSource": "issued",
"canonicalRequest": {
"surface": "light",
"target": "chart_series",
"kind": "categorical",
"count": 6,
"intent": {
"intensity": "restrained",
"temperature": "cool",
"huePreference": [
"blue",
"teal"
]
}
},
"canonicalRequestDigest": "sha256:a8a91a5c055195eff73c414de6cf7e8486cf7a669a22e30c0494f28ac51d4198"
},
"palette": {
"ref": {
"seed": "sqg.eyJlIjoiMTAxMTEyMTMxNDE1MTYxNzE4MTkxYTFiMWMxZDFlMWYiLCJyIjp7ImNvdW50Ijo2LCJpbnRlbnQiOnsiaHVlUHJlZmVyZW5jZSI6WyJibHVlIiwidGVhbCJdLCJpbnRlbnNpdHkiOiJyZXN0cmFpbmVkIiwidGVtcGVyYXR1cmUiOiJjb29sIn0sImtpbmQiOiJjYXRlZ29yaWNhbCIsInN1cmZhY2UiOiJsaWdodCIsInRhcmdldCI6ImNoYXJ0X3NlcmllcyJ9fQ",
"seedSource": "issued",
"requestDigest": "sha256:a8a91a5c055195eff73c414de6cf7e8486cf7a669a22e30c0494f28ac51d4198",
"source": "generated",
"paletteDigest": "sha256:71affc729ff1b2bc5cc589d516a270ae5ac42969c1ce29495f6cafa6e5513849"
},
"displayName": null,
"kind": "categorical",
"model": "adaptive",
"surface": "light",
"cardinality": 6,
"colors": [
"#3F5613",
"#358052",
"#00675B",
"#3283B0",
"#565D99",
"#9F72AF"
],
"direction": "normal",
"application": {
"chartStyleTokens": {
"--sq-series-1": "#3F5613",
"--sq-series-2": "#358052",
"--sq-series-3": "#00675B",
"--sq-series-4": "#3283B0",
"--sq-series-5": "#565D99",
"--sq-series-6": "#9F72AF"
},
"target": "chart_series"
},
"evidence": {
"surfaceContrastMinimum": 3.818,
"pairwiseMinimum": 9.193,
"state": "validated"
},
"warnings": []
}
}Sequential cool ramp for a continuous scale
{
"surface": "light",
"intent": {
"huePreference": [
"blue"
],
"temperature": "cool"
},
"kind": "sequential"
}{
"replay": {
"seed": "sqg.eyJlIjoiMTAxMTEyMTMxNDE1MTYxNzE4MTkxYTFiMWMxZDFlMWYiLCJyIjp7ImludGVudCI6eyJodWVQcmVmZXJlbmNlIjpbImJsdWUiXSwidGVtcGVyYXR1cmUiOiJjb29sIn0sImtpbmQiOiJzZXF1ZW50aWFsIiwic3VyZmFjZSI6ImxpZ2h0IiwidGFyZ2V0IjoiY29sb3JfZ3JhZGllbnQifX0",
"seedSource": "issued",
"canonicalRequest": {
"kind": "sequential",
"surface": "light",
"intent": {
"temperature": "cool",
"huePreference": [
"blue"
]
},
"target": "color_gradient"
},
"canonicalRequestDigest": "sha256:4942f2f5d40d230d7ddb1e846e269466781ca8c02fbabd3e83e205a9fd8f8532"
},
"palette": {
"ref": {
"seed": "sqg.eyJlIjoiMTAxMTEyMTMxNDE1MTYxNzE4MTkxYTFiMWMxZDFlMWYiLCJyIjp7ImludGVudCI6eyJodWVQcmVmZXJlbmNlIjpbImJsdWUiXSwidGVtcGVyYXR1cmUiOiJjb29sIn0sImtpbmQiOiJzZXF1ZW50aWFsIiwic3VyZmFjZSI6ImxpZ2h0IiwidGFyZ2V0IjoiY29sb3JfZ3JhZGllbnQifX0",
"seedSource": "issued",
"requestDigest": "sha256:4942f2f5d40d230d7ddb1e846e269466781ca8c02fbabd3e83e205a9fd8f8532",
"source": "generated",
"paletteDigest": "sha256:6bdf80d605d684a07421f1fda60c40d59e56d4a7d01eafc527d5fdf243c183fe"
},
"displayName": null,
"kind": "sequential",
"model": "continuous",
"surface": "light",
"cardinality": 9,
"colors": [
"#D2F1FF",
"#9BDFFD",
"#66CBF4",
"#2BB6E6",
"#009FCC",
"#0088AF",
"#007193",
"#0F5B75",
"#274451"
],
"stops": [
{
"color": "#D2F1FF",
"t": 0
},
{
"color": "#9BDFFD",
"t": 0.125
},
{
"color": "#66CBF4",
"t": 0.25
},
{
"color": "#2BB6E6",
"t": 0.375
},
{
"color": "#009FCC",
"t": 0.5
},
{
"color": "#0088AF",
"t": 0.625
},
{
"color": "#007193",
"t": 0.75
},
{
"color": "#0F5B75",
"t": 0.875
},
{
"color": "#274451",
"t": 1
}
],
"interpolation": {
"colourSpace": "OKLab",
"profile": "perceptual-smooth"
},
"closure": "clamp",
"direction": "normal",
"application": {
"target": "color_gradient",
"chartStyleTokens": {}
},
"evidence": {
"surfaceContrastMinimum": 1.182,
"surfaceContrastMaximum": 10.335,
"stopCount": 9,
"lightnessMonotonic": true,
"state": "validated"
},
"warnings": []
}
}Recommended use cases
- Create colours when palette.recommend finds no approved match for hard constraints
- Get a seed you can keep, so the same colours come back from palette.replay
Avoid for
- Default colour choice when a reviewed palette exists — use palette.recommend
- Getting a palette you already generated back — use palette.replay
- Claiming brand-approved or editorial tone suitability
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.