As a simple example, suppose we want just these four colours:
Code: Select all
%IMG7%magick ^
xc:#f00 xc:#800 xc:#080 xc:#008 ^
+append +repage ^
map.png

An ordinary remap gives:
Code: Select all
%IMG7%magick ^
toes.png ^
+dither -remap map.png ^
od3_r.png

Code: Select all
%IMG7%magick ^
toes.png ^
-ordered-dither checks,8,8,8 ^
+write od3_o.png ^
+dither -remap map.png ^
od3_d.png

The final result od3_d is:

EDIT to add: the final result varies with different numbers of levels. For example, instead of "8,8,8" we might use "3,3,3", which has the final result:
