     strip.setPixelColor(i, rgb_to_hexcolor(blended_rgb));
     
     config[i].state = config[i].state + config[i].speed;
-    if( config[i].state <= 0 || config[i].state >= 100 ) {
+    if( config[i].speed > 0 )
+      config[i].state = config[i].state + random(0, config[i].randomness);
+    else
+      config[i].state = config[i].state - random(0, config[i].randomness);
+    if( config[i].state <= (100 - config[i].depth) || config[i].state >= 100 ) {
       config[i].speed = -config[i].speed;
     }
-    if( config[i].state <= 0 )
-      config[i].state = 0;
+    if( config[i].state <= (100 - config[i].depth) )
+      config[i].state = (100 - config[i].depth);
     if( config[i].state >= 100 )
       config[i].state = 100;
   }

// Love to Code

// Rainbow tape "Fade Color" demo.

// This simple demo enables you to fade a pixel between two colors
// In this variant, we fade using HSV space, instead of alpha blending

// select colors codes using the "Rainbow Gadget".
// or use any color from https://github.com/chibitronics/ltc-compiler-layer/blob/master/support/html_colors.h
#include "html_colors.h"
int pix0_colorA = 0x17c7d1;      // can specify color as hex code
int pix0_colorB = COLOR_DARKRED; // or specify color as html-standard name
int pix0_speed = 3;              // a number 0-100
int pix0_brightness = 50;        // a number 0-100

int pix1_colorA = COLOR_GREEN;
int pix1_colorB = COLOR_RED;
int pix1_speed = 5;
int pix1_brightness = 20;

int pix2_colorA = COLOR_BLUE;
int pix2_colorB = COLOR_HOTPINK;
int pix2_speed = 4;
int pix2_brightness = 100;

int pix3_colorA = COLOR_TEAL;
int pix3_colorB = COLOR_FUCHSIA;
int pix3_speed = 3;
int pix3_brightness = 80;

int pix4_colorA = COLOR_RED;
int pix4_colorB = COLOR_BLUE;
int pix4_speed = 2;
int pix4_brightness = 15;

#include "Adafruit_NeoPixel.h"


  int speed;
  uint8_t brightness;
  int state;
  int randomness;
  int depth;
};
static pix_config config[pixelCount]; 

