You could repaint it on the car but it will turn out much better if you remove, prep the surface properly, and then repaint it. The main reason why you want to remove it is to get all the edges right and to avoid getting overspray on the car. If you use a spray can to paint the trim and don't cover the entire car, there will be tiny black spots of paint everywhere, even on the other side of the car and on the other car in the driveway, so I recommend removing the trim if you want to spray it with a can. If you just want to paint it with a brush, that will work too but you still need to prep it and get the corners right.
black paint (black rustoleum works well and is a good color match)
magnetic 10mm socket
First, remove the rear door cards (the door panel). See 1000q: door card removal for more details.
There is a rubber plug covering the 10mm bolt holding the trim. It's
location is circled in red below, remove it and unscrew the bolt. I suggest using a magnetic socket here
because it will probably fall into the door. If you don't have a magnetic
take a wad of paper towel and line the inside of the socket so that the socket
will be a tight fit against the bolt; you can also try tape or sticky putty to help
Pull the rubber weather stripping up and pull the black triangular trim up and out. The trim
has a plastic clip that holds it in place, marked in red below, use a screwdriver or pin to press it
down while you pull the trim up and out. Here is the trim removed.
Lightly sand the surface of the trim to prep it for paint. You can use primer if you want. Repaint. Black rustoleum is a near perfect color match, is cheap, and will be durable. Note: when using aerosol spray cans, make sure you are far away from any other cars or anything you don't want paint on! Aerosol spray cans throw a lot of overspray into the air and can travel 50 feet and stick onto your car, so stay downwind! Installation is the reverse of removal.
Feel free to sign up and ask a question about this article at the forums here: myturbodiesel.com forums