Set Custom PNG Color Palette
Map every pixel in a PNG to the nearest color from a custom palette.
Drop an image here
PNG, JPG, WebP, GIF or BMP. You can also paste an image.
No result yet
Options
Colors
How to use
- 1
Upload a PNG by clicking the upload area or dragging a file in.
- 2
Set the palette size (2 to 8 colors).
- 3
Pick each color in the palette.
- 4
Click Download to save the result.
Example
Before640 × 427

After640 × 427

Frequently asked questions
How does the color matching work?
Each pixel is compared to every palette color using Euclidean distance in RGB space. The closest palette color replaces the original pixel.
Is transparency preserved?
Yes. The alpha channel is not changed.
About this tool
Set Custom PNG Color Palette replaces every pixel with the closest matching color from a palette you define. Use 2 to 8 colors. The nearest color is chosen by straight-line distance in RGB space. All processing runs locally using the Canvas API. Your image is never uploaded to any server.