I'm trying this command:
magick convert .\0.png +dither -colors 256 -remap .\allColors.bmp -define png:color-type='3' -define png:preserve-colormap out.png
convert: Valid palette required for paletted images `out.png' @ error/png.c/MagickPNGErrorHandler/1715.
If I don't add the preserve colormap, it deletes all the unused colors, however I need to keep them so OpenRCT2 recognize the palette. I'm using ImageMagick from a python script in a blender file. If there is any alternative to creating an indexed png image with that specific color table, please inform me. Thanks.