diths

Dither images from your terminal or your agent.

diths is a Rust CLI for dithers, halftones, Risograph prints, pixel art, looping GIFs and SVGs.

$ curl -fsSL https://cdn.diths.design/install.sh | bash
Read the docs
dith apply still-life.png -o hero.png --preset risograph-duo --width 1200 --height 560 --fit cover --pixel-size 21/5

Presets

Start from a preset, then change any flag.

still-life.pngThe source photo: a still life
The still life in black and white, Atkinson-dithered

mac-classic

dith apply still-life.png -o mac-classic.png \ --preset mac-classic --max-dim 384
The still life as a newsprint halftone

halftone-zine

dith apply still-life.png -o halftone-zine.png \ --preset halftone-zine --max-dim 384
The still life as a black and red woodcut

woodcut

dith apply still-life.png -o woodcut.png \ --preset woodcut --max-dim 384
The still life in four Game Boy greens

gameboy

dith apply still-life.png -o gameboy.png \ --preset gameboy --max-dim 384
The still life in the PICO-8 palette

pico8

dith apply still-life.png -o pico8.png \ --preset pico8 --max-dim 384
The still life as a lo-fi photo

lo-fi-photo

dith apply still-life.png -o lo-fi-photo.png \ --preset lo-fi-photo --max-dim 384

Generate

Make art with no input image.

for p in mac-classic risograph risograph-duo gameboy crt-amber \
         blueprint halftone-zine film-stipple pico8 woodcut; do
  dith generate sphere -o sphere-$p.png --preset $p --canvas-width 224 --canvas-height 224
done

Animate

Turn a pattern or a photo into a looping GIF.

A dithered sphere turning in a loop, in risograph blue and pink

A procedural loop

dith animate sphere -o orb.gif --preset risograph-duo --frames 36 --fps 20 \ --canvas-width 588 --canvas-height 392
The whippet photo with its dot size sweeping from fine to coarse and back

A sweep over a photo

dith animate whippet.png -o focus.gif --preset mac-classic \ --sweep-pixel-size 2..12 --ping-pong --max-dim 588

Formats

Save it as an SVG, or preview it in the terminal.

The still life as circles in an SVG, one path per colour

Vector dots, one path per colour

dith apply still-life.png -o still-life-riso.svg --preset risograph-duo \ --max-dim 160 --svg-shape circle --svg-skip-bg
⢀⠀⠀⠀⠐⡠⢾⣿⣻⡿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⢟⣿⣿⢷⣿⣻⣿⣷⣾⣯⣿⣶⣠⡂⠄⠀⠀⠀⠀
⡀⠀⠀⠀⠠⢰⢼⣯⣳⣽⡿⢟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣿⡯⣿⣿⣿⣿⣟⣿⢿⣿⣫⣾⡿⣽⣯⡾⣿⢾⣭⡿⣯⣾⣻⣻⠞⣻⣿⢟⢷⡿⡔⡨⢀⠀
⡀⠂⠀⠀⠐⠰⢾⡛⣮⣿⣷⣯⣿⣿⣟⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣯⣛⣯⣿⣷⣽⣿⣿⣿⡟⣔⢛⢵⡽⣷⣪⢿⣽⣏⣯⣯⣶
⠀⠀⠀⠀⠀⡀⣿⣶⣾⣟⣿⣷⣿⣿⣷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣷⣿⣿⣿⣴⣟⢿⣭⣵⣟⣿⣽⣿⣞⣻⣛⡗⢃⣻⢇⣼
⠀⠄⠂⠁⢂⠐⢻⣿⣫⣷⣿⢿⣾⣯⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⢿⣾⣿⣿⣿⣽⣷⣿⣷⢿⣯⢿⣿⢟⣿⢽⣶⢕⣮⣽
⠄⠀⠂⢀⠀⢠⣿⣿⣽⣿⣟⣾⢞⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⠋⠉⠙⠉⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣞⣟⣟⢾⡟⢞⣿⣿⣯
⠄⡀⡅⠀⠠⠀⠟⣻⣿⣿⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢿⣿⣿⡄⠠⡂⠀⠀⢸⡿⠟⠉⠿⠿⣿⣿⣿⣿⣿⣿⣯⣿⣿⣾⣯⣿⣿⣿⣿⣿⢿⣿⢟
⠀⠀⠀⠀⡀⡭⣷⣿⣚⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡟⠉⠄⠀⠙⡙⣧⡄⠀⠀⢀⣾⠁⠶⠍⠀⠀⠘⢻⣿⣿⣿⡿⣿⣿⣿⣿⣟⣟⣿⣿⣶⣿⣿⣿⣿
⠄⠀⠁⠓⠂⢄⢻⣯⣷⣯⣿⡿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁⠀⠀⠀⠀⢀⠹⣿⡇⠀⠸⠃⢸⠘⠈⠀⠀⣠⣿⣿⣿⣿⣿⣿⣿⣷⣿⡿⣿⣶⣿⣿⡿⣷⣵⣿
⠀⠐⠀⠐⠀⠁⢻⢮⢿⣸⢿⣿⠯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⣀⣤⡺⠀⠹⠀⠀⠁⠀⠸⢣⣶⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣽⣿⢾⣿⢶⣿⣖⢻⣿
⠀⠂⠀⠀⠀⠉⣺⣿⣿⣿⡿⣿⣾⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣞⣼⣿⣿⣿⣿⣾⣭⡿
⠀⠁⢒⡀⠡⠈⣺⣗⡾⣟⢷⣯⢿⣿⣟⣿⣿⣿⡿⢿⡿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣶⣆⠀⠀⠹⢿⠿⣿⣿⣿⡯⣿⡿⣿⢿⣿⣿⣿⣿⡷⣫⢿⣷⣕⣿⣿⣷⣷
⠀⠃⠂⠤⠀⡃⢞⣿⣯⢿⣿⣿⣮⣿⣿⣿⣿⣟⠀⢨⣿⡊⠉⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⣿⣿⢸⣿⣿⣿⢿⣿⣟⣿⣾⣿⣿⢿⣿⣿⣟⣿⣾⣿⢯⣻⡿
⠠⠀⠀⠀⠀⠁⢛⣯⣿⣽⣿⣟⣿⣿⣿⡿⣿⣿⣾⣾⣿⣁⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡋⠀⠀⢩⣯⣾⣿⣿⣿⣻⡿⣿⢾⣾⣿⣭⡿⣷⣟⢽⣾⣯⢿⣳⣞⡜
⠀⠁⠁⠀⠀⡀⣬⣍⢹⣽⣿⣿⣽⣿⣿⣿⣾⣿⣿⣿⡟⡒⠃⠀⠐⢿⣿⣿⣿⣿⡿⣿⣿⣿⢬⠁⣼⣿⣿⣿⣿⣿⣷⣿⣾⣿⣷⣻⣶⣿⣽⣿⣷⣷⣧⣾⣾⢿⢧⣿
⠐⠘⠈⠀⠀⠀⠻⣮⣯⣾⣿⢶⣾⣿⣿⣻⣿⣿⣿⣿⠃⠁⠀⠀⢀⣿⣿⣿⣿⣿⠀⠹⣿⣿⠄⠸⣿⣿⣿⣿⣿⣿⠏⠘⠛⠋⠉⠉⠉⠁⠉⠈⡑⣲⣖⣄⡀⣀⣀⣀
⠀⠈⡠⠀⢀⣤⣬⣿⡽⣯⣿⣟⣯⣿⣿⣿⢿⣿⣿⣭⣂⣀⣀⢀⢀⣈⣙⣉⣀⣀⣀⣤⣬⣯⢥⣥⣹⣿⣿⡿⠛⠁⠐⠒⠛⠛⠛⠒⠛⠓⣙⣿⢾⣹⣿⢁⡵⣚⢪⡯
⠈⠀⣠⣴⡟⣼⣻⣿⡭⣿⣻⣯⣽⣿⣿⣿⣯⢽⣿⣿⣟⣿⢿⣿⣿⣿⢿⣿⣯⣿⣿⣿⣿⣿⣗⢽⣿⣿⣟⣷⡶⣶⢶⢖⣶⢶⣦⡿⣾⣷⢟⣶⣾⣷⢽⣷⣦⢯⣯⢟
⠠⢚⠛⠞⢋⠒⠛⠋⡂⠒⢋⠛⠛⠛⠋⠘⠛⠞⠛⠿⠾⠡⠿⠯⠯⠛⣻⠆⠿⠛⠟⡛⠿⠛⠛⠙⠛⠛⠻⠟⠛⠻⢚⠃⠋⢛⠚⠛⠻⠙⢛⠋⠙⢋⠋⠪⠉⡊⠙⠛
⠀⠀⠀⠂⠀⠀⠀⠀⠈⠁⠀⠀⠀⠊⠀⠀⠁⠐⠈⠈⠀⠀⠀⠉⠂⠀⠀⠂⠀⠀⠀⠁⠀⠀⠀⠒⠀⠉⠀⠈⠀⠀⠀⠀⠀⠀⠂⠀⠀⠁⠀⠀⠉⠀⠀⠀⠂⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀

Braille, when the terminal can't show pixels

dith preview still-life.png --preset risograph --inline \ --mode braille --cols 60

For agents

Every command speaks JSON, so agents can drive it.

--json
A report for every command, and errors with a code and a suggestion.
dith capabilities
Every command, flag and range in one manifest.
--dry-run
Checks the flags and plans the output size without writing a file.
--emit-recipe
Records the exact settings so a look can be replayed.
Agent skill
install.sh adds it to Claude Code, Codex, Cursor, Gemini CLI, OpenCode, GitHub Copilot, Windsurf and Factory Droid.
$ dith inspect still-life.png --json | jq -r '.recommendations[].example_command'dith apply "still-life.png" -o out-editorial.png --preset editorial-print --max-dim 960 dith apply "still-life.png" -o out-mac.png --preset mac-classic --max-dim 960 dith apply "still-life.png" -o out-lofi.png --preset lo-fi-photo --max-dim 960 dith apply "still-life.png" -o out-riso.png --preset risograph --max-dim 960
A labelled contact sheet of the still life in four presets

A contact sheet to look at before choosing

dith compare still-life.png -o sheet.png \ --presets editorial-print,mac-classic,lo-fi-photo,risograph --tile-max-dim 270
$ dith apply still-life.png -o a.png --preset risograph-duo --max-dim 800
Wrote a.png (800x537, 11345 bytes, algo=floyd-steinberg, palette=risograph-duo, 59ms)
$ dith apply still-life.png -o b.png --preset risograph-duo --max-dim 800
Wrote b.png (800x537, 11345 bytes, algo=floyd-steinberg, palette=risograph-duo, 59ms)
$ shasum -a 256 a.png b.png
41f5811cc24d5736466a0c621c512caba8058be1102cb979164fd77de972d51f  a.png
41f5811cc24d5736466a0c621c512caba8058be1102cb979164fd77de972d51f  b.png

Same input and flags, same file.

Byte for byte, every run.

Install

One line installs diths and its agent skill.

macOS and Linux
$ curl -fsSL https://cdn.diths.design/install.sh | bash
Update
$ dith update
From source
$ cargo install --git https://github.com/lassejlv/dith

The command is dith.

v0.5.0, 24 November 2026. Apple silicon Macs, Linux x86_64 and Linux ARM.

Release notes