OK, in the end I used a loop to threshold the 17 shades of magenta to a new bitmapdata, and then I used this nice ColorMatrix helper class to rotate the hue:
http://www.quasimondo.com/archives/000565.php
And then just used copypixels() to copy back onto the source image. Works a charm.