# Character workshop

The workshop turns a **seed** into a pixel character, the same one every time and in every format.
Click a cell to retouch it (empty, outline, body), check the nine poses of the `codex-pet-v1` sheet,
then copy the source: nothing here is a file format of its own, what you copy goes straight into a
story.

<PixelWorkshop />

## What you copy

| Grid                 | Copy Markdown                         | Copy JSON                             |
| -------------------- | ------------------------------------- | ------------------------------------- |
| from the seed        | the directive `::pixel{gen=sprite …}` | the recipe, `PixelRecipeSchema`       |
| retouched by a click | a ` ```pixel ` fence with its legend  | the `pixel` block, `PixelBlockSchema` |

A recipe stays small and regenerates its grid; a retouched grid is frozen and edited by hand from
then on. Both are described on the [pixel page](/pixel).

**Download PNG** saves the sprite as a picture, `pixel-<seed>.png`, 8 px per cell with the empty
cells transparent. It is drawn in your browser (`OffscreenCanvas`), in the colours the preview
shows: a token such as `accent` takes the colour of this site. A picture is a copy for elsewhere (a
slide, a chat); the source above stays what a story reads.

## Colours

The outline is the `text` token and the body the `bg` token: black and white on the base site. Pick
`accent` for the body and the character takes the accent of the site that shows it, in light and
dark mode, without a second source.

## The poses

The nine rows are those of `codex-pet-v1` (`idle`, `running-right`, `running-left`, `waving`,
`jumping`, `failed`, `waiting`, `running`, `review`). They are placeholders made by shifts, bounces
and a mirror, never by a model. To write the sheet as a file:

```sh
recit pixel sheet figure.json -o figure.webp
```

Real poses, layers and shading belong in a drawing tool: see [import a sprite sheet](/pixel-import).

## Portraits

When a character is described in a bible, `@recit/character` draws its bust portrait from the same
model as the body: quantized in pixel art, deterministic, in the colours of the theme. Nothing is
imported and no third-party generator is involved.

<PortraitWorkshop />

See [the bible reference](https://docs.recit.dev/documentation/scenario/bible#a-described-character-preview) for
the full syntax of parts, poses, expressions and renders.
