I think you want to map all colours to one of 8 "primaries". So, let's make a palette of acceptable colours:
convert xc:red xc:lime xc:blue xc:cyan xc:magenta xc:yellow xc:white xc:black +append palette.gif
And enlarge it and look at it (because at the moment it is only 8x1 pixels):
Now take this colorwheel
:
and remap all the colours to your "acceptable" palette without dithering:
convert colorwheel.png +dither -remap palette.gif result.png
and now remap with dithering:
convert colorwheel.png -remap palette.gif result.png
You can make your own palette - you don't have to use my colours, and you can make any RGB/HSL, hex colour you like, e.g.:
convert xc:"rgb(10,20,200)" xc:"#ff7832" xc:"hsl(10,40,90)" +append palette.gif
If you want the names and hex values of the colours in the resulting images:
convert result.png -unique-colors txt:
Sample Output
# ImageMagick pixel enumeration: 7,1,65535,srgb
0,0: (65535,0,0) #FF0000 red
1,0: (0,65535,0) #00FF00 lime
2,0: (65535,65535,0) #FFFF00 yellow
3,0: (0,0,65535) #0000FF blue
4,0: (65535,0,65535) #FF00FF magenta
5,0: (0,65535,65535) #00FFFF cyan
6,0: (65535,65535,65535) #FFFFFF white