TachiSnap
TachiSnap — Pixel Snapper for animation pixel artists. Rust + WebAssembly client-side tool for cleaning up AI-generated…
Repalette is an image colorizer written in C and Rust. It is available as both a CLI utility and a web application.
Web-version:
| input.jpg | output-no-dither.png | output-burkes.png |
|---|---|---|
![]() |
![]() |
![]() |
Examples:
# a built-in preset, with 2x multisampling repalette apply input.jpg output.png -p nord -m 2x # a manual palette (6-digit hex, no '#') repalette apply input.jpg output-no-dither.png -c 000000,ff0000,ffffff --dither none repalette apply input.jpg output-burkes.png -c 000000,ff0000,ffffff --dither burkes # recolor using a palette extracted from the image itself (compression) repalette apply input.jpg output-extracted.png -k 32 # recolor using a palette extracted from a different reference image repalette apply input.jpg output-transfer.png --palette-from reference.jpg # browse the presets repalette palette list repalette palette show gruvbox-dark # extract an N-color palette from an image repalette extract input.jpg -k 16
Run repalette --help to learn more
Host the website with any server or go to https://ziap.github.io/repalette.
The user interface:
You need:
Build the native version
cargo build --release
Build the WASM version
build.sh
Recoloring to the 13-color nord palette. Times are wall-clock means
from hyperfine; quality is
measured against the source (higher PSNR/SSIM = closer to the
original). Absolute numbers are hardware dependent, so read them as
relative.
Dithering speed on full 4K (3840x2160), repalette vs ImageMagick -remap:
| Tool | Command | Time |
|---|---|---|
| repalette | -d none |
198 ms |
| repalette | -d fs |
297 ms |
| repalette | -d jjn |
346 ms |
| ImageMagick | -dither None -remap |
1050 ms |
| ImageMagick | -dither FloydSteinberg -remap |
571 ms |
| ImageMagick | -dither Riemersma -remap |
1256 ms |
NOTE: ImageMagick's -dither FloydSteinberg -remap uses approximate
nearest-neighbor search, hence it's faster than undithered remap.
Repalette uses exact search, but is still ~1.9x faster thanks to SIMD acceleration.
Multisample quality on 1080p, Floyd–Steinberg:
| Method | PSNR (dB) | SSIM |
|---|---|---|
-d none |
19.79 | 0.836 |
-d fs |
18.47 | 0.754 |
-d fs -m 2x |
20.02 | 0.857 |
-d fs -m 4x |
20.00 | 0.864 |
Error diffusion trades an artifact (color banding) for another (grains). Both has imperfect quality, but dithering is worse because it directly affect the image structural fidelity (SSIM).
Multisample mode combines colorization with image resampling/filtering to smooth out the grains, while keeping the band-free look. This recovers the quality and improves beyond the no-dither baseline.
Multisample performance on 1080p, Floyd–Steinberg.
| Method | Time | Memory |
|---|---|---|
repalette -d none |
57 ms | 18 MB |
repalette -d fs |
82 ms | 18 MB |
repalette -d fs -m 2x |
206 ms | 18 MB |
repalette -d fs -m 4x |
695 ms | 18 MB |
| IM chain, 2x (Triangle) | 663 ms | 193 MB |
| IM chain, 4x (Catrom, direct) | 2430 ms | 595 MB |
| IM chain, 4x (Triangle, stacked 2x) | 2534 ms | 691 MB |
Multisample mode uses a fused algorithm with buffered streaming to dramatically reduce memory usage, beating sequential processing pipelines: ~3x faster and ~10-30x less memory.
This project is licensed under the AGPL-3.0 license.
more like this
TachiSnap — Pixel Snapper for animation pixel artists. Rust + WebAssembly client-side tool for cleaning up AI-generated…
多源壁纸聚合平台 · 自动归档 Bing + Unsplash 精选壁纸 · AI 视觉故事生成 · 企业微信推送 · GitHub Pages 在线画廊
meine 🌒 - A CLI file manager and system utility built with Textual. It combines intuitive command parsing with rich t…
.Net 10 (.Net 8+) webassembly starter project using raylib-cs nuget 7.0.2 and raylib 5.5
search projects, people, and tags