pxart 0.1.0

Command reference

Every command's own help, as pxart prints it. Each page here is the output of pxart help CMD, so the site and the tool say the same thing.

Looking

Render previews, sheets, GIFs and scenes to look at while you work.

pxart help LOOKING →

Checking

Find format errors, read sizes and colors, prove two renders match.

pxart help CHECKING →

Editing

Change frames, palettes and files, rewriting only the lines that change.

pxart help EDITING →
flip

Mirror selected frames left-right (--v: top-bottom)

shift

Move a frame's pixels (or a region's) by dx,dy, dropping or wrapping what goes past the edge.

set

Paint single pixels ('.' erases)

fill

Paint a rectangle (default: the frame; '.' clears)

new

Start a frame, blank or filled with one key, in a new file or an existing one; or a file with no frames that imports a palette (--empty).

put

Replace one frame's grid with rows from stdin (palette lines first, optionally).

mask

Erase every pixel outside rectangles or circles (or inside, --invert), or by key; a PNG too.

crop

Cut a rectangle out of one frame into a frame of its own, in the same file or another.

extract

Write only the selected frames to a new file, with their palette, imports and @anim lines.

recolor

Repaint, swap or rename palette keys in frames ('a=b', 'a<>b', 'a>b'), or give a key a new color.

paste

Copy one frame (or a region of it) onto another at x,y; '.' never overwrites.

compose

Stack frames from any files (layers at x,y, or a --map's cells) into one frame of OUT, bringing their keys and variants into OUT's palette. Add --rekey when two sources (or a source and OUT) use the same key letter for different colors: E_KEY_CONFLICT says so.

dup

Copy a frame under a new id, placed after its animation's last frame, to edit the copy; or a whole group under a new name, with its timing, pivots and @anim line (dup hero.px:walk/right walk/left).

anim-set

Write an animation's timing and pivot on its @anim line (or one frame's), or mark it @still.

palette

List a file's palette and what each variant does; or edit it: add keys and variants, derive a night or dusk, hoist, import, remove, order, comment, export.

Drawing

Lines, shapes, fills, shading and outlines in palette keys.

pxart help DRAWING →

Converting

Get art in from PNGs and out to Aseprite, Tiled or plain PNGs.

pxart help CONVERTING →

Help

The reference itself, by topic or command.

pxart help HELP →

pxart -h

The short overview: the format in a few lines, and the commands by topic.

usage: pxart [-h]
             {render,sheet,anim,onion,scene,world,tint,check,stats,diff,frames,flip,rotate,transpose,shift,mask,recolor,set,crop,paste,new,put,fill,line,rect,poly,ellipse,arc,flood,outline,shade,extract,compose,dup,anim-set,palette,export,help,from-png} ...

pxart: pixel art as text. Sprites are text files; renders are PNGs you can look at.

A sprite is a .px text file: a palette, then a grid of its keys.
    # comments start with '#'
    pxart 1                  optional version line (first non-comment line)
    @palette base.px         optional: import palette keys from another .px file
    k #3f2631                palette: one key char, then #rrggbb, #rrggbbaa, or 'transparent'
    g #43e1b3                ('.' is always transparent; you may omit it)

    ....kkkk....             grid rows: all the same width, only palette keys.
    ...kggggk...             The sprite's size is the grid's size: nothing to count.

Any command that takes FILE takes FILE:walk/down (a group) or FILE:walk/down/0 (a frame).
+----------------------------------------------------------------------------------------+
| zsh users: write "${F}:walk", not "$F:walk" (zsh reads ':w' as a modifier), or quote   |
| the whole argument. A missing hero.pxalk/0 or hero.pxidle is reported as that mistake. |
+----------------------------------------------------------------------------------------+

Commands by topic ('pxart CMD -h' for one, 'pxart help TOPIC' for a topic's reference):
  LOOKING     render sheet anim onion scene tint world
  CHECKING    check stats diff frames
  EDITING     flip shift set fill new put mask crop extract recolor paste compose dup anim-set palette
  DRAWING     line rect poly ellipse arc flood rotate transpose shade outline
  CONVERTING  export from-png
  HELP        help
  (rename)    no command of its own: frames FILE --rename GROUP NEWGROUP renames frames; recolor FILE 'a>b' a key

Topics: FORMAT (the .px format: frames, animation, pivots, variants, selecting frames), LOOKING,
CHECKING, EDITING, DRAWING, CONVERTING, HELP, ERRORS. 'pxart help all' prints the whole reference.
Own topics: 'pxart help worlds' (Tiled worlds), 'pxart help slots' (palette slots: a key's
alternatives for a game to recolor; render --slots, export --indexed).

Start here: 'pxart help recipes' walks through seven workflows end to end: port a pack and prove
it lossless, merge packs with variants, build a dusk or night, slice a sheet, make a scene from a
map, check an animation's feet, stamp an overlay behind an animation.

positional arguments:
  {render,sheet,anim,onion,scene,world,tint,check,stats,diff,frames,flip,rotate,transpose,shift,mask,recolor,set,crop,paste,new,put,fill,line,rect,poly,ellipse,arc,flood,outline,shade,extract,compose,dup,anim-set,palette,export,help,from-png}

options:
  -h, --help            show this help message and exit
This page is built from site/src/data/reference.json in the repository.Edit on GitHub