A non-matplotlib way to do this is to use ImageMagick or GraphicsMagick:
gm convert -colorspace Gray color_image.png bw_image.png
in GraphicsMagick or using the ImageMagick routine "convert":
convert -colorspace Gray color_image.png bw_image.png
I think it works on a wide variety of image formats.
I need to prepare two versions of figures: color and BW(Black&White).
Is there an easy way to produce just the colored version and than use
some command or script to turn it to BW or grayscale?
I thought that converting from color to BW really means: "in all
object in the figure, turn any color that is not white to black".
Is there an easy way to implement this?