code: public static BufferedImage recolorImage (
          BufferedImage image, Color rootColor, float[] dists, float[] offsets)
      {
          return recolorImage(image, new Colorization[] {
              new Colorization(-1, rootColor, dists, offsets) });
      }
docs: Used to recolor images by shifting bands of color (in HSV color space) to a new hue. The
  source images must be 8-bit color mapped images, as the recoloring process works by
  analysing the color map and modifying it.