The simplest incarnation of the fade-in circuit I have planned is
This gets a time constant of ~2.7s before taking into account the dynamic resistance of the amber LED with Vf=2.1V. It's to only fade in once on power-up and doesn't need additional control.
My question is: when the power is turned off and C1 discharges through D1, will I risk damage to the LED?
This graph from the specsheet:
suggests that if the capacitor had charged to 2.1V, on discharge it will momentarily be at the very top of the LED's rated current, 20mA. Adding a resistor inline with C1 would mitigate this risk but may interfere with the fade-in effect, as there would be an initial voltage over the diode at t=0. If I added this second resistor, I guess I could just choose it so that in voltage divider configuration it works out to well below the forward voltage drop of the diode?