Fastled palette and group array

Hi. All..
Hope someone give the solution.
How to make color palette flow through ledarray In fillpalette function?
Thank you.

#include <FastLED.h>

#define LED_PIN 3          //STRIP SETUP                                                     
#define COLOR_ORDER GRB                                      
#define LED_TYPE WS2812B                                       
#define NUM_LEDS 20    
#define BRIGHTNESS  75
#define FRAMES_PER_SECOND  120

#define line_segment  5     //STRIP CONTROL
#define led_per_segment  2

CRGB rawleds[NUM_LEDS];
CRGBSet leds(rawleds, NUM_LEDS);
CRGBSet seg0(leds(0,1));
CRGBSet seg1(leds(2,3));
CRGBSet seg2(leds(4,5));
CRGBSet seg3(leds(6,7));
CRGBSet seg4(leds(8,9));
struct CRGB*ledsarray[]={seg0,seg1,seg2,seg3,seg4};

uint8_t paletteIndex =0;
uint8_t x =0;
uint8_t hue=0;
uint8_t maxhue=255;
CRGBPalette16  currentPalette = RainbowColors_p;
TBlendType   currentBlending = LINEARBLEND;

void setup() {
  FastLED.addLeds<LED_TYPE, LED_PIN,COLOR_ORDER>(leds, 0, NUM_LEDS).setCorrection(TypicalLEDStrip);


void loop(){


void fillpalette() {
  for(x=0; x<line_segment; x++){
  leds[ledsarray[x]]=ColorFromPalette( currentPalette, paletteIndex, 255, currentBlending); 
  //fill_palette(ledsarray[x], led_per_segment, paletteIndex, 255 / NUM_LEDS, currentPalette, 255, currentBlending);
  paletteIndex +=10;  };

void sinelon_line_segment() {    
  fadeToBlackBy( leds, NUM_LEDS, 5); 
  for(int i=0; i<line_segment; i++){  
  int pos = beatsin16(10,0,line_segment);
  fill_solid(ledsarray[pos],led_per_segment, CHSV( hue, 255, 255)); 
  EVERY_N_MILLISECONDS(50) {                                  
  if(hue>maxhue){hue  = 0;}  }

You didn't say whether the code you posted attempts to do that or not, is it just raw example code? Or is it your attempt at colour cycling? If so, can you explain more about your attempt?

Also please describe the manner in which you want the colours to be displayed. There are millions of ways in which it could "flow".

thank you for reply.
seg0 is A......seg4 is E.
each letter contain group of led.
color palette flow through letter.
maybe look a like scrolling text.
it's mean one letter one color

As you have seen, this cycles the entire strip. To control partitions of the strip, all you need to do is restrict the index to the LEDs that you want to cycle. Obviously, you have to add some offset value to the cycles, or they would all change in unison (unless that's what you want).

  for(x=letter1beginning; x<letter1end; x++){