I have a lot of bmp images like these:

That I need to convert to transparent png files like:

basically the blue color (#00FFFF) needs to turn transparent and the purple color (FF00FF) needs to turn into a grey color (#747474).
The BMP files are really old with a color depth of 8-bit, they are originally from the game "Heroes 3", I'm trying to port this game to webgl but the sprites are currently my biggest issue.
I have found this original topic in which imagemagick was recommended, however I can't figure out how to batch convert files in windows using imagemagick, nor how I would turn the purple color on the bmp to the actual grey value in the transparent png.
I'd really like some advice on this or an example of what the windows command prompt line would need to be in order to batch convert files with imagemagick.



