Input:
ColorMap Image:
Code: Select all
convert xc:red xc:orange xc:yellow xc:lime xc:cyan xc:blue xc:magenta xc:white xc:black +append colormap.png
Code: Select all
identify -verbose colormap.png
0: (255, 0, 0) #FF0000 red
1: (255,165, 0) #FFA500 orange
2: (255,255, 0) #FFFF00 yellow
3: ( 0,255, 0) #00FF00 lime
4: ( 0,255,255) #00FFFF cyan
5: ( 0, 0,255) #0000FF blue
6: (255, 0,255) #FF00FF magenta
7: (255,255,255) #FFFFFF white
8: ( 0, 0, 0) #000000 black
Processing with -remap:
Code: Select all
convert logo.png +dither -remap colormap.png logo_mapped.png
Code: Select all
identify -verbose logo_mapped.png
0: (255,255,255) #FFFFFF white
1: ( 0, 0, 0) #000000 black
2: (255,165, 0) #FFA500 orange
3: ( 0, 0,255) #0000FF blue
4: (255,255, 0) #FFFF00 yellow
5: (255, 0, 0) #FF0000 red
6: ( 4, 7, 7) #040707 srgb(4,7,7) <--- This color is not In my colormap.png