.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.1
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 |
Minimal example
{
"genart": "1.1",
"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