From what i can tell in Photoshop the last color in the palette is color zero, with no mechanism to move it, very annoying. I guess a lot of people use PaintshopPro to organize their indexed colors, but i couldn't move my masking color to zero from 255 in my old version of PSP, so i'm doing the annoying way in Photoshop for now:
My masking color is all on one layer, so i hide that layer and convert the image to indexed, then specify a palette of 255 colors, then custom, then edit the last color square to be my masking color. It will add a bunch of colors to fill in through 256 if you have less than 256 colors but it won't add to the file size since their not in your image. Now that you have your color table the way you want it, save it to disk and go back in History to right before the Indexed color, unhide the layer(s) with your masking color, convert to indexed and saveAs to create your image.