Do you have a nice picture and a cool palette and want to mix them up? Your solution is here! Use Paletter to make all colors in your image turn into one of the colors in the palette, minimizing their "color difference".
With gcc installed on your machine, simply run:
make all
in the repository's root directory.
To use Paletter, you will need an image file and a CSV file that contains the hexcode of each color in your palette, separated by commas. Then, run:
./paletter <path-to-image-file> <path-to-csv-file> <output-file>
Or, if you use Windows, you might have to rename the file "paletter.exe", and then run:
paletter.exe <path-to-image-file> <path-to-csv-file> <output-file>
There are four supported output formats:
- PNG (.png)
- JPG (.jpg, .jpeg, .jpe, .jif, .jfif, .jfi)
- BMP (.bmp, .dib)
- TGA (.tga, .targa, .tpic)
Using the following palette:
54478c,2c699a,048ba8,0db39e,16db93,83e377,b9e769,efea5a,f1c453,f29e4c
The original and paletted pictures are seen below:
![]() |
![]() |
---|
I've put a number of palettes you can play with in the examples/palettes
folder.
I'm using three of Sean Barrett's amazing single-file libraries for image manipulation and dynamic arrays. Go check them out!