Octree color quantization
code
(GPLv3)
Original true color
Reduced to 32 colors
Reduced to 256 colors