specific programming question with the ws2812b led strips

Hi everyone.

I have recently started using the ws2812b led strips and have a specific animation in mind that I want it to do but am at a bit of a loss as to how I program it.

I want a strip of 162 leds to be lit blue(slowly pulsing would even be better) and to have a knightrider kind of effect move along the strip that encompasses maybe 6 red leds at a time. Once the red knightrider effect passes I want the leds to return to the blue until the red effect comes around again.

I can make the whole strip one color. I have also had a little luck using the cylon example to make the strip have a color running down the strip and back. I haven’t been able to figure out how to have the strip be one color and then have another color running down the strip and back with the other leds going back to the original color.

Below is my current code for what it is worth. I know I am not even close but if anyone has any ideas of a direction to pursue I would appreciate it.

#include <FastLED.h>

#define NUM_LEDS 162
#define DATA_PIN 7

// Define the array of leds
CRGB leds[NUM_LEDS];

void setup() { 
	Serial.begin(9600);
  FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
	LEDS.setBrightness(100);

  
  }

void fadeall() { 
  for(int i = 0; i < NUM_LEDS; i++) { 
    leds[i].nscale8(255);        
    } 
   }      



void loop() { 
	for(int i = 0; i < NUM_LEDS; i++) {
    leds[i] = CRGB::Purple;               
    FastLED.show(); 
 //   fadeall();                                     
 }

}

Have you looked at all the Knightrider neopixel stuff on the internet?