# Drawing pixel art (/docs/guide/pixel-art)

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.

![The sprout sample in the editor: a pixel character on the grid, its palette, and the Real size panel](</_next/static/media/guide-pixel.2q1axz2eb_1_0.png>)

## Start a pixel drawing [#start-a-pixel-drawing]

1. 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 erase [#draw-and-erase]

1. Press **B** and draw. Each pixel takes the current colour, and the colour joins the palette.
2. Shift click to draw a straight line from the last pixel.
3. 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 start from a ready palette, click **palettes**.

## Draw both sides at once [#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.

## Write text in pixels [#write-text-in-pixels]

Press **T** on a pixel layer, click and type, and press **Esc**. The text becomes pixels in the current colour, with hard edges like the rest of the sprite. After that it is pixels, not text, so check the spelling before you press **Esc**; **cmd Z** takes it back. From the command line: `klad pixel sprite.klad l1 --color ink --text 'GO!' --at 2,3 --text-size 9`.

## Move or change part of a sprite [#move-or-change-part-of-a-sprite]

1. Press **S** and drag a box around the pixels. The box takes the pixels inside it, also from marks that reach past its edge.
2. Drag them to move them, or use the bar under them to flip, turn, recolour, copy or delete them.

## Shade along a ramp [#shade-along-a-ramp]

1. Click a palette colour and click **ramp**. Five steps of it join the palette, dark to light.
2. 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 [#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 [#animate-a-sprite]

1. Click the arrow at the left of the timeline to open it: a drawing of one frame shows only its bar. Right click the drawing's cell and pick **duplicate to the next frame**.
2. Press **O** for onion skin, and change the pixels that move.
3. Click a drawing's cell in the timeline and press **=** to hold it 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 [#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 [#check-your-pixels]

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 [#make-a-tile-or-a-tileset]

- For one tile that repeats, select **View > Tile: wrap at the edges**. What you draw past an edge comes back in on the other side.
- For a set of tiles, select **View > Tileset: cut into tiles…**, enter the tile size, and click **cut into tiles**. The canvas shows the tile lines.

## Export it sharp [#export-it-sharp]

1. Select **File > Export** and pick **Image…**, **GIF…**, **Sprite sheet…** or **Aseprite file…**.
2. Set **times real size** to a whole number, such as 8, and click **Export**.

A tileset goes to Godot with **a tile set** under **File > Export > Godot…**.

Working with an agent? Give it `klad skill` and `klad skill pixel`: [With an agent](with-an-agent.md).
