I have images (png) that are 128x128 pixels, how do I convert the image so that each pixel in the image is closest in color to the ones in the following array? The array will probably get bigger with more specific colors, but in this case: [(0, 255, 100), (100, 100, 100), (255, 255, 255), (0, 0, 0), (156, 126, 210)]
Asked
Active
Viewed 84 times
0
-
There are a couple of ideas here https://stackoverflow.com/a/53483679/2836621 – Mark Setchell Nov 30 '18 at 14:55
-
I put your palette into the code here https://stackoverflow.com/a/53482138/2836621 and it works fine. – Mark Setchell Nov 30 '18 at 17:30