I have an issue with the fadeToBlackBy function which is not fading the LEDs

I have an issue with the fadeToBlackBy function which is not fading the LEDs all the way to black…

Brightness is dimmed, but not faded.

THANKS!

***

#define LED_PIN 7
#define NUM_LEDS 9
#define BRIGHTNESS 64
#define LED_TYPE WS2812B
#define COLOR_ORDER GRB
CRGB leds[NUM_LEDS];
#define fadespeed 200

void setup() {
delay( 1000 ); // power-up safety delay
FastLED.addLeds<LED_TYPE, LED_PIN, COLOR_ORDER>(leds, NUM_LEDS).setCorrection( TypicalLEDStrip );
FastLED.setBrightness(BRIGHTNESS);
Serial.begin(9600);
}

void loop()
{
int last_led = NUM_LEDS-1;
for (int i = 0 ; i< NUM_LEDS ; i++)
{
if(i<last_led) {
leds[i] = CRGB::White;
leds[last_led] = CRGB::White;
FastLED.show();
leds[i].fadeToBlackBy( fadespeed );
leds[last_led].fadeToBlackBy( fadespeed );
}
if(i>last_led) {
leds[i] = CRGB::Green;
leds[last_led] = CRGB::Green;
FastLED.show();
leds[i].fadeToBlackBy( fadespeed );
leds[last_led].fadeToBlackBy( fadespeed );
}
if(i==last_led) {
leds[i] = CRGB::Red;
FastLED.show();
leds[i].fadeToBlackBy( fadespeed );
}
last_led–;
delay(200);
}
}

I think your setting then fading individual led with every if block.

Maybe leds.fadeToBlackBy(fadespeed)

You have to keep running fade over and over to have lit pixels continue to darken.

Consider reordering things so you first fade all pixels, then update your new pixels. Then call show.