Styrofoam is made from Polystyrene. Staining Polystyrene will not affect it, it’s just a change of color. You can still see the white foam under the stain. If you really want a darker color, then the only way to do so is to get a darker color of paint.