code: public void setColorInterpolated(int index, int firstIndex, int lastIndex, int color) {
  		int firstColor = map[firstIndex];
  		int lastColor = map[lastIndex];
  		for (int i = firstIndex; i <= index; i++)
  			map[i] = ImageMath.mixColors((float)(i-firstIndex)/(index-firstIndex), firstColor, color);
  		for (int i = index; i < lastIndex; i++)
  			map[i] = ImageMath.mixColors((float)(i-index)/(lastIndex-index), color, lastColor);
  	}
docs: Set the color at "index" to "color". Entries are interpolated linearly from
  the existing entries at "firstIndex" and "lastIndex" to the new entry.
  firstIndex < index < lastIndex must hold.
  @param index the position to set
  @param firstIndex the position of the first color from which to interpolate
  @param lastIndex the position of the second color from which to interpolate
  @param color the color to set