I made a small tool to apply "color palette restriction" on images !
I got inspired by /r/place and I wanted to exercice my python skills so I tried to make a tool to redraw images with a specific color palette (/r/place color palette)

Here are some examples :

[Reference image](https://preview.redd.it/3p4us69n7xr81.jpg?width=494&amp;format=pjpg&amp;auto=webp&amp;s=0535c1eed010716f053549eec31a88d4453f2f6e)

[Color palette restriction without dithering](https://preview.redd.it/63df44kt7xr81.png?width=494&amp;format=png&amp;auto=webp&amp;s=341497026bb4dd39dc63718cf792ba1e1f3030ef)

[Color palette restriction with  Floyd-Steinberg dithering](https://preview.redd.it/xccpwquw7xr81.png?width=494&amp;format=png&amp;auto=webp&amp;s=8156a2f09de8b2a58c92f72ef90a5b017a1df2a7)

It can also work with any color palette provided !

Also, I am using PIL to read and draw on images.

&amp;#x200B;

You can find the source code here :  [https://github.com/nrbt25/image-dithering/tree/master](https://github.com/nrbt25/image-dithering/tree/master) 