Or alternatively just change the voltage. If this is for an application unconnected with empegs and the LED is to be used as an indicator, we can do simple things with just a capacitor which will smoothly dim the LED when power is removed.

Ages ago I made an earring which worked under this kind of principle - multicolour LED through the ear with circuits connected to the Red and Green leads which varied the voltage over time (2 sine wave generators at slightly different frequencies) to give some cool/odd effects.
_________________________
Rory
MkIIa, blue lit buttons, memory upgrade, 1Tb in Subaru Forester STi
MkII, 240Gb in Mark Lord dock
MkII, 80Gb SSD in dock