I have learned how to generate a palette image from a source image using ImageMagick:
convert source.png -colors 256 -unique-colors -scale 1000% palette.png
An image with a single row of colors, such as the following, is output:
However, I would like set a value to limit the number of squares/columns, & start a new row when that number is reached. So the output should look more like this:
Is it possible to do this with ImageMagick? Or is there another method to do so?