How do I extract main colors form an image and then map to a color map?
convert original.jpg -dither None -map colors.bmp converted.bmp
convert converted.bmp -format %c histogram:info:-
convert original.jpg -dither None -map colors.bmp converted.bmp
convert converted.bmp -format %c histogram:info:-