aseprite_pixels
Draw pixel art onto a sprite by supplying a rectangular block of pixels as hex colors or compact character strings, leaving other pixels untouched.
Instructions
Draw a rectangular block of pixels - the main tool for putting actual artwork into a sprite. The origin is the top-left of the canvas; x grows right, y grows down.
Two ways to pass data:
pixels: array of rows, each row an array of hex colours. null or "." leaves the pixel transparent.rows+key: rows given as compact strings where each character is looked up inkey. Much shorter for larger art - for example rows: ["kksskk","kssssk"] with key: {"k":"#1a1c2c","s":"#ffcd75"}.
All rows must be the same length. Drawing only touches the pixels you supply; everything else on the canvas is left alone. To keep revisions cheap, send one small block per part (outline, fill, shading) rather than repainting the whole sprite.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Left edge of the block (default 0). | |
| y | No | Top edge of the block (default 0). | |
| key | No | Character-to-colour map, e.g. {"k":"#000000"}. "." always means transparent. | |
| rows | No | Rows as character strings, resolved through `key`. | |
| frame | No | Target frame (default 0). | |
| layer | No | Target layer (default active layer). | |
| pixels | No | Rows of hex colours, e.g. [["#000000","#ff0000"],["#ff0000",null]]. | |
| points | No | Alternatively, an explicit list of pixels. | |
| document | No | Document to act on: a short name inside the art folder ("hero"), a relative path, or an absolute .aseprite path. Omit to use the active document. |