Flowing aimation help

Pass an 'offset' from 0 to 300 to move the starting point of the gradient:

void gradientFlow(int offset)
{
  for (int i = 0; i < NUM_LEDS; i++)
  {
    index = (i + offset) % 300;
    leds[index] = CRGB( round (170 + (i * 0.26666)), 0, round (20 + (i * 0.26666)));
  }
}