Design file format & one-shot generation
Colors
Anywhere a color is expected — an element's fill, a stroke.color, or an artboard
background — you pass a color object. It's one of four shapes.
Hex (screen / RGB)
{ "hex": "#1a1a2e", "alpha": 1 }
alpha is optional (0–1). Use hex in RGB documents.
CMYK (print)
{ "cmyk": [0, 90, 70, 0] }
Four ink percentages, each 0–100 (cyan, magenta, yellow, black). Use in CMYK documents — the value is stored as authoritative print ink, with an on-screen soft-proof derived automatically.
Swatch reference
{ "swatchRef": "brand", "tint": 1 }
References a swatch you declared in styles.swatches by its key. tint (0–1) is optional.
Swatches keep colors consistent and, for spot swatches, produce named Separation plates:
"swatches": [
{ "key": "brand", "name": "Brand red", "type": "process", "cmyk": [0, 90, 70, 0] },
{ "key": "die", "name": "die cut", "type": "spot", "cmyk": [0, 100, 0, 0], "purpose": "die cut", "overprint": true }
]
Spot purpose can be die cut, cut line, kiss cut, white ink, varnish, foil, or
spot uv.
Gradient
{
"gradient": {
"type": "linear",
"angle": 90,
"stops": [
{ "color": "#7c3aed", "position": 0 },
{ "color": "#ec4899", "position": 1 }
]
}
}
type is linear, radial, or conic. Provide two or more stops (position 0–1). Stop
colors are hex, rgba(...), or cmyk(c,m,y,k); use rgba(r,g,b,0) for a stop that fades to
transparent.