On Ruby, I think they share the same palette. Just make both exactly the same and it should work. FR is a completely different story, ugggh.
Edit: Make sure in GIMP or Photoshop or whatever, that both sprites are not only the same color, but use the exact same color order. After rereading your post, that is where I think you went wrong. The colors aren't in the same order in the indexed images.
I opened up the hero front sprite in irfanView and exported the palette, imported it into the hero back sprite and tried it again and it still doesn't work