Your image is not monochrome -- that would be only two colors and typically black and white.
Nevertheless, you have red pixels inside the border that touch the border. How are you going to change the border pixels only?
Lets say you can change only the border red pixels to blue, call this blue.png
Code: Select all
convert blue.png -fuzz XX% -fill white +opaque blue -fill red -opaque blue red.png
-fuzz XX% will allow the border pixels not to be perfectly red (for example if anti-aliased). If they are all perfectly red, then remove -fuzz or set XX to 0.
The trick is isolating only the border red pixels from the other red pixels interior that are also red and touch the border.
Your image also has an alpha channel, which seems to be there for anti-aliasing. So the above would need to have the image flattened first.
Even removing the alpha channel shows that the underlying image has black mixed with the red. So that complicates it.