If your supply is cut for a couple of seconds, then you will need quite a large capacitor to keep power supplied to the head unit, especially if the volume is turned up quite high at the time.
You will also need to think about the choice of diode that will be able to cope with the current demands of the head unit and also the inrush current of initially ...
I would put the switch in the power supply (+) wire.
But if there are two power wires I would not switch the one controlling the memory settings, but that would leave an albeit small energy drain.
Make sure you also fit suitable fuses.
Just put a switch in the red lead.
Even an inline table lamp switch would suffice, the voltage is low and so is the current.
Or you could get a small on/off round button type switch and mount it neatly in a bracket.
The two purple wires usually make up the pair for the right rear speakers. Here's the usual breakout for the wiring:
Constant 12V / Memory Keep Alive: Yellow
Dimmer/illumination: Orange w/white stripe
Right front speaker(+): Gray
Right front speaker(-): Gray w/black stripe
Left front ...
I did this years ago, and kept the power supply (12vdc) permanently switched on. The power drain was very low. Turn off the radio, and the psu keeps the memory going.
If you go to the trouble of wiring in a battery and a trickle charger, what's the point? Power stays on to something!
Solar Mike's answer is correct in it's description, however I would also add the following from experience.
When I have done this in the past (20-odd years ago I think!) the harness adaptor came wired with the correct colours and pin layout according to the ISO specification and the majority of cars but if I remember correctly the permanent and switched (ACC)...
I checked this out in a 2012 Colt. There was the same connector but only with 3 pins connected. Green, purple and pink.
I found out The Sony XAV head units have integrated steeringwheel control for japanese cars. I conencted green and purple to tip and ground and it started working directly.
I measured the old radio what was happening on the pink cable, ...