Fade out LED setColor()

I have a defaultBrightness red color of setColor(50,0,0) so the LED is never truly off.

When another pin goes HIGH , I want red to go bright like setColor(255,0,0).

I want the very high brightness to fade down to the default brightness of (50,0,0). Sosometing like this:

if(highBritness == HIGH) {

while (highBrightness > defaultBrightness ) {

decrement the 255 value down to 50 and stop at 50. decrement to 50 over a span of approx. half a second.


Where do I start with this? Thanks in advance to anyone willing to help me with this! }