We have Trex Deck on a screened in porch. I resorted to sanding a couple of spots to get rid of stains, left when the cat upchucked his food. Now those spots are darker than the rest of the flooring and I can't find anything to bring it back to normal color. Stain and color pens just tend to darken it more.
If you haven't sanded through the color topcoat and into the base material, try one of those automotive "miracle" formulas that restore vinyl tops or the plastic bumper covers on late model vehicles, to like new condition, so they claim. I haven't tried them but it may be worth a shot.
The stains are gone. Using a garden sprayer, we mixed half bleach and half water, sprayed the Trex Deck and rinsed well. The place I sanded is barely noticeable too.