   for(uint8_t y=0; y<ROWS; ++y)
     for(uint8_t x=0; x<COLS; ++x){
       for(uint8_t i=0; i<3; ++i)
-        leds[xy2i(x,y)].raw[i] = (uint8_t) (((uint16_t) leds[xy2i(x,y)].raw[i]*19 + new_colors[y][x][i])/20);
-        // colors[y][x][i] = (uint8_t) (((uint16_t) colors[y][x][i]*19 + new_colors[y][x][i])/20);
-      
-      // leds[xy2i(x,y)] = CRGB(colors[y][x][0],colors[y][x][1],colors[y][x][2]);
+        leds[xy2i(x,y)][i] = (uint8_t) (((uint16_t) leds[xy2i(x,y)][i]*19 + new_colors[xy2i(x,y)][i])/20);
     }
   LEDS.show();
 }

    //first row
    if(onPixels[0][x]){
      // Determine a random hue
      CRGB newcolor;
      newcolor.setHSV(random(0,256), 255, 255);
      
      new_colors[0][x][_R] = newcolor.r;
      new_colors[0][x][_G] = newcolor.g;
      new_colors[0][x][_B] = newcolor.b;
    }
  }
  for(uint8_t y=ROWS-1; y>0; --y)
    for(uint8_t x=0; x<COLS; ++x){
      if(onPixels[y][x]){
        for(uint8_t i=0; i<3; ++i)
          new_colors[y][x][i] = new_colors[y-1][x][i];
      } else {
        for(uint8_t i=0; i<3; ++i)
          new_colors[y][x][i] = 0;
      }
    }
  for(uint8_t x=0; x<COLS; ++x){
    //first row -> turn off the off pixels after propagation of colour
    if(!onPixels[0][x]){
      new_colors[0][x][_G] = 0;
      new_colors[0][x][_R] = 0;
      new_colors[0][x][_B] = 0;
    }
  }
}

#define _G 1
#define _B 2

CRGB new_colors[NUM_LEDS];


// Return 0-based led index for 0-based x and y grid co-ordinate values
