Detect self power off (and delay power off)
If you're dead set on the switch method, here's what I would suggest: 







simulate this circuit &ndash; Schematic created using CircuitLab
This uses a DPST switch, instead of SPST.
This configuration solves the diode and capacitor problems you were having, and allows you to use attachInterrupt() to create a function to wipe all of the neopixels before loss of power. Note, however, that you will need your capacitor(s) to be able to supply the arduino AND all of the neopixels while you are writing to them. This is doable, but requires high farad values. Super capacitors can be an option, but tend to be more expensive. BGMicroElectronics has some that can fit a budget. 2.7 V 50 F capacitors for a couple bucks, put them in series for 5V and 25 F, but they require lots of power to charge, too much for the vast majority of power supplies to handle. You can search for other super capacitors, but I suggest this method instead:

If you aren't powering this with a battery, use something like this (SE) (the first answer) or this (youtube) (recommended) instead, then a pushbutton is enough to tell the arduino to power down, and the arduino itself cuts off the power, after resetting all of the neopixels. These solutions do consume minimal amounts of power while powered off, which is why I don't suggest them for battery powered applications.

To echo Wesley Lee in the comments: the diode and capacitor as you have them will not work. Capacitors do not allow DC to pass, so that configuration alone wont allow power to get to the arduino,but then the diode prevents current from flowing to the capacitor anyway. I fixed that using the DPST switch to prevent backflow instead.  

It could also be done this way:







simulate this circuit

Where Vin is the barrel jack connector not the arduinos 5 V line, But again youl run into the problem of chargin the capacitors, and them holding all of the energy that you need.