A drawing app built for agent/human collaboration
Rust
The pixel art guide covers mirroring, moving pixels, variants, animating and pictures
Indicode BV7f4f5307d9d9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 34716b0..3140b0f 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,10 +4,10 @@The first builds, and klad's licences.-- `klad check` is quiet enough to read: it lists what stands out (a single pixel outside the shape or in a flat area, an L in a drawn line) and counts single pixels among other colours and corners in shading in one line as left out. A 64 px sprite that gave 77 findings gives 15. The editor's **Check pixels** marks the same ones.+- `klad check` is quiet enough to read: it lists what stands out (a single pixel outside the shape or in a flat area, an L in a drawn line) and counts single pixels among other colours and corners in shading in one line as left out. A 64 px sprite that gave 77 findings gives 15. The editor's **Check the pixels** marks the same ones.- `klad export -o` takes a folder that exists for every kind of export and puts the export in it under its usual name; a sheet used to land next to the folder.- A new icon, painted in klad: a K in two brush strokes.-- Two pixel art samples, `sprout` (a 32 px character with an idle and a walk) and `ground` (a tileset of 16 px tiles), in the start window and `klad samples`, and a guide, Drawing pixel art.+- Two pixel art samples, `sprout` (a 32 px character with an idle and a walk) and `ground` (a tileset of 16 px tiles), in the start window and `klad samples`, and a guide, Drawing pixel art: starting a drawing, drawing and mirroring, moving pixels, ramps, a second colouring, animating a sprite, turning a picture into pixels, the checks, tiles and exports.- A third agent skill, `klad skill pixel`: the craft of pixel art (size and palette, silhouette, clusters, clean lines, outlines, ramps with hue shift, shading without pillow shading or banding, anti-aliasing by hand, tiles, and a checklist at real size), and animating a sprite frame by frame: the four poses of a walk, heights and holds, what moves with the body and what trails it, the idle, and how to judge it. Under the MIT licence, like the other two.- Pixel checks. `klad check sprite.klad` lists the usual slips of pixel art with their places: single stray pixels, doubled corners in one-pixel lines, jagged lines, banding, and colours that are not in the palette. In the editor **Check the pixels** marks them on the canvas and follows your edits until you turn it off. They are places to look at, not errors.- Tilesets. **View > Tileset: cut into tiles…** cuts a drawing into tiles of one size; the canvas shows the tile lines, and **as a tile set** in the export window writes a Godot TileSet with a tile for every cell that is not empty. From the command line: `klad new ground.klad --pixel 64x48 --tile 16`, `klad canvas --tile 16`, `klad pixels --tile 2,0` and `klad pixel --grid --tile 2,0` to read and draw one tile at a time, and `klad export --tileset <folder>`.diff --git a/docs/guide/pixel-art.md b/docs/guide/pixel-art.mdindex 7c2ce74..c73db34 100644--- a/docs/guide/pixel-art.md+++ b/docs/guide/pixel-art.md@@ -1,8 +1,8 @@-_Last updated: 2026-11-12 23:50_+_Last updated: 2026-11-12 13:05_# Drawing pixel art-Draw sprites and tiles on a grid where one pixel is one pixel, in the colours of a palette, and export them sharp.+Draw sprites and tiles on a grid where one pixel is one pixel, in the colours of a palette. Animate them, and export them sharp.@@ -11,6 +11,8 @@ Draw sprites and tiles on a grid where one pixel is one pixel, in the colours of1. In the start window, select **Pixel art** and choose a size, such as 32 x 32.2. Click **Create**. The drawing opens enlarged, with a grid between the pixels, and the **Real size** panel shows it at the size it really is.+To carry on with a sprite from Aseprite, click **Choose an Aseprite file...** in the start window instead. It opens as a new klad drawing next to the file, with its layers, frames, palette and tags.+## Draw and erase1. Press **B** and draw. Each pixel takes the current colour, and the colour joins the palette.@@ -18,7 +20,16 @@ Draw sprites and tiles on a grid where one pixel is one pixel, in the colours of3. Press **E** and drag to clear pixels.4. Press **G** and click inside a shape to fill it, or **U** to drag a rectangle, an ellipse or a line.-To change a colour everywhere, click it in the palette, change the colour, and click **update**.+To change a colour everywhere, click it in the palette, change the colour, and click **update**. To start from a ready palette, click **palettes**.++## Draw both sides at once++In the pencil's options, turn on **mirror**. The pencil, the shapes and the fill now draw each pixel's twin across an upright line. Drag **at x** to move the line.++## Move or change part of a sprite++1. Press **S** and drag a box around the pixels.+2. Drag them to move them, or use the bar under them to flip, turn, recolour, copy or delete them.## Shade along a ramp@@ -26,9 +37,35 @@ To change a colour everywhere, click it in the palette, change the colour, and c2. Draw a shape with the middle step.3. In the pencil's options, select **darker** or **lighter** and go over the pixels: each one moves a step along its ramp.+## Make a second colouring++1. In the Colour panel, click **new variant**. The drawing now shows the variant.+2. Click a palette colour, change it, and click **update**. Only the variant changes.+3. Under the palette, click **base** to see the first colours again.++To export one file for each, see [palette variants](exporting.md#export-palette-variants).++## Animate a sprite++1. Right click the drawing's cell in the timeline and pick **duplicate to the next frame**.+2. Press **O** for onion skin, and change the pixels that move.+3. Press **=** to hold a drawing a frame longer.+4. Press **Return** to play, and again to stop.++Every frame is a drawing of its own: in-betweens and bones don't work on pixel layers. For clips and timing, see [Animating frame by frame](animating.md).++## Turn a picture into pixels++1. Select **File > Pixels of a picture…**.+2. Pick **a picture file**, **this layer** or **the whole picture**.+3. Set **longest side px**, such as 64. Leave **colours** at 0 to use the palette's colours.+4. Click **make pixels**.++A picture file lands on the pixel layer you are on. The other two make a new pixel drawing and leave this one as it is.+## Check your pixels-Select **Layer > Check the pixels**. Single pixels, doubled corners, jagged lines, banding and colours outside the palette get a box on the canvas. The boxes follow your edits; select it again to turn it off.+Select **Layer > Check the pixels**. klad puts a box around what stands out: a single pixel outside the shape or in a flat area, a doubled corner in a line, a jagged line, banding, and a colour outside the palette. Small ones that are likely details are counted in the message, not boxed. The boxes follow your edits; select it again to turn it off.## Make a tile or a tileset@@ -41,6 +78,6 @@ Select **Layer > Check the pixels**. Single pixels, doubled corners, jagged line2. Pick **image**, **GIF**, **sprite sheet** or **Aseprite**.3. Set **times real size** to a whole number, such as 8, and click **export**.-A tileset goes to Godot with **as a tile set** in the same window. For other colourings of the same sprite, see [palette variants](exporting.md#export-palette-variants).+A tileset goes to Godot with **as a tile set** in the same window.Working with an agent? Give it `klad skill` and `klad skill pixel`: [With an agent](with-an-agent.md).