.genart File
Complete specification of the .genart sketch file format
.genart File Format
A .genart file is a self-contained JSON document representing a single generative art sketch. It includes metadata, renderer configuration, parameters, colors, algorithm code, and state.
Format version
Current version: 1.3
The genart field specifies the format version. Version 1.0 files without a renderer field default to { "type": "p5" }.
Required fields
| Field | Type | Description |
|---|---|---|
genart | string | Format version ("1.1") |
id | string | Unique sketch identifier |
title | string | Human-readable title |
created | string | ISO 8601 timestamp |
modified | string | ISO 8601 timestamp |
renderer | object | Renderer configuration |
canvas | object | Canvas dimensions |
parameters | array | Parameter definitions |
colors | array | Color palette definitions |
state | object | Current runtime state |
algorithm | string | Algorithm source code |
Renderer
{
"renderer": {
"type": "p5",
"version": "1.x"
}
}Supported types: p5, three, glsl, canvas2d, svg. See Renderers for details.
Canvas
Dimensions can be explicit or reference a preset:
{ "canvas": { "width": 1200, "height": 1200 } }{ "canvas": { "preset": "hd-1920x1080" } }See Canvas Presets for all 17 built-in presets.
Parameters
Each parameter defines a control for the algorithm:
{
"parameters": [
{
"key": "amplitude",
"label": "Wave Amplitude",
"type": "number",
"min": 5,
"max": 80,
"step": 1,
"default": 40,
"tab": "waves"
}
]
}| Field | Type | Required | Description |
|---|---|---|---|
key | string | yes | Unique identifier within the sketch |
label | string | no | Display label |
type | string | yes | "number", "boolean", "string", "select" |
min | number | no | Minimum value (number type) |
max | number | no | Maximum value (number type) |
step | number | no | Step increment (number type) |
default | any | yes | Default value |
tab | string | no | Tab group assignment |
Parameter keys must be unique. The default value must be within min/max range.
Colors
Color palette definitions:
{
"colors": [
{ "key": "background", "label": "Background", "default": "#0A0A0A" },
{ "key": "stroke", "label": "Stroke Color", "default": "#22D3EE" }
]
}Themes
Optional named color presets:
{
"themes": [
{
"name": "Neon",
"colors": ["#0A0A0A", "#00FF41", "#FF00FF"]
},
{
"name": "Warm",
"colors": ["#1A0A00", "#FF6B35", "#FFD700"]
}
]
}State
Current runtime values:
{
"state": {
"seed": 42,
"params": { "amplitude": 40, "frequency": 0.05 },
"colorPalette": ["#0A0A0A", "#22D3EE"]
}
}Snapshots
Historical state captures:
{
"snapshots": [
{
"id": "snap-001",
"label": "Best composition",
"timestamp": "2026-02-14T12:00:00Z",
"state": { "seed": 99, "params": { "amplitude": 60 }, "colorPalette": ["#0A0A0A", "#FF6B35"] },
"thumbnailDataUrl": "data:image/jpeg;base64,..."
}
]
}Optional fields
| Field | Type | Description |
|---|---|---|
subtitle | string | Short description |
skills | string[] | Design skills used (e.g., ["golden-ratio", "complementary"]) |
philosophy | string | Markdown text explaining the artistic intent |
tabs | object[] | Tab definitions for parameter grouping |
themes | object[] | Named color presets |
snapshots | object[] | Historical state snapshots |
components | ComponentRef[] | Declared component dependencies |
layers | LayerDef[] | Design layer stack (see Design Mode) |
compositionLevel | number | 1-4, calibrates critique severity |
symbols | SketchSymbolValue[] | Symbol instances used in the sketch |
references | Reference[] | Inspiration reference images with analysis |
series | SeriesDef | Series membership and stage |
lineage | LineageDef | Fork/promote history |
Components
Declared component dependencies that the algorithm uses:
{
"components": [
{ "name": "prng", "version": "^1.0.0" },
{ "name": "noise-2d", "version": "^1.0.0" }
]
}See Components for the component tools.
Layers
Design layer stack rendered by the compositor on top of the algorithm output:
{
"layers": [
{
"id": "layer-001",
"type": "typography:text",
"name": "Title",
"visible": true,
"locked": false,
"opacity": 1,
"blendMode": "normal",
"properties": { "text": "Hello", "fontSize": 48, "color": "#FFFFFF" },
"transform": { "x": 100, "y": 50, "width": 400, "height": 80 }
}
]
}See Design Mode for details on layers, plugins, and the compositor.
Symbols
Symbol instances attached to the sketch:
{
"symbols": [
{ "id": "sym-001", "symbolId": "star", "source": "library", "fillColor": "#FFD700" }
]
}See Symbols plugin for the full symbol system.
References
Inspiration reference images with optional structured analysis:
{
"references": [
{
"id": "ref-001",
"type": "artwork",
"source": "Monet, Water Lilies",
"imagePath": "references/monet.jpg",
"analysis": {
"composition": "Horizontal bands of water and sky",
"palette": ["#2D5016", "#7BA3C9", "#E8D4B8"],
"mood": "Serene, contemplative"
}
}
]
}See Reference tools for importing and analyzing references.
Series
Series membership with narrative context:
{
"series": {
"id": "series-001",
"label": "Organic Growth",
"stage": "refinements"
}
}Lineage
Fork and promotion history:
{
"lineage": {
"forkedFrom": "parent-sketch-id",
"forkedAt": "2026-03-01T12:00:00Z",
"generation": 2,
"promotedFrom": "study-sketch-id",
"promotedAt": "2026-03-02T10:00:00Z"
}
}
## Minimal example
```json
{
"genart": "1.3",
"id": "minimal-example",
"title": "Minimal Example",
"created": "2026-02-14T00:00:00Z",
"modified": "2026-02-14T00:00:00Z",
"renderer": { "type": "p5", "version": "1.x" },
"canvas": { "width": 1200, "height": 1200 },
"parameters": [],
"colors": [],
"state": { "seed": 42, "params": {}, "colorPalette": [] },
"algorithm": "function sketch(p, state) {\n p.setup = () => {\n p.createCanvas(state.canvas.width, state.canvas.height);\n p.background(20);\n };\n p.draw = () => {};\n return { initializeSystem() {} };\n}"
}Validation rules
The parser rejects files that:
- Are missing any required field (
id,algorithm, etc.) - Have an unknown
renderer.type - Have an unrecognized
canvas.preset - Have duplicate
parameterkeys - Have a
defaultvalue outside themin/maxrange