private static int modifyInt(int rgb, int amount) {
      int r = rgb & 0xFF0000 >> 16;
      int g = rgb & 0x00FF00 >> 8;
      int b = rgb & 0x0000FF;
      int result = 0;
      
      r += amount;
      g += amount;
      b += amount;
      
      if(r < 0) {
         r = 0;
      }
      else if(r > 255) {
         r = 255;
      }
      
      if(g < 0) {
         g = 0;
      }
      else if(g > 255) {
         g = 255;
      }
      
      if(b < 0) {
         b = 0;
      }
      else if(b > 255) {
         b = 255;
      }
      
      result = result | 0xFF000000;
      result = result | (r << 16);
      result = result | (g << 8);
      result = result | (b);
      
      return result;
   }