create_sprite
Create a new Aseprite sprite file with a set canvas size, color mode, and optional background fill, saved as an editable, layer-preserving document.
Instructions
Create a new sprite file and save it.
Args:
filename: Output path. Relative paths go in the workspace. Use a
.aseprite/.ase extension to keep layers & frames editable.
width, height: Canvas size in pixels. Each axis is capped at 16384px
and the total area at 16,777,216 pixels (e.g. 4096x4096).
color_mode: "rgb" (default), "indexed", or "gray".
background: Optional fill colour for the first layer (e.g. "#1d2b53").
Omit for a transparent canvas.
overwrite: Replace `filename` if it already exists (default False = no-clobber).
An **indexed** sprite is created with a usable 33-colour palette: a transparent
entry at index 0 (the index that means "no pixel here"), then the 32 colours
Aseprite ships as its default. Aseprite's own new indexed sprite has 256 entries of
identical black instead, which made every colour equidistant from every entry, so
every draw resolved to index 0 and was invisible while reporting success. A
`background` colour that the default palette does not contain is appended to it, so
the background is the exact colour asked for rather than the nearest one available.
Replace the whole palette with `set_palette` when you have one in mind.
Returns the new sprite's structured info.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| width | Yes | ||
| height | Yes | ||
| filename | Yes | ||
| overwrite | No | Default: false. | |
| background | No | ||
| color_mode | No | Default: "rgb". | rgb |