code: public static Bitmap createTintTransformationMap(Bitmap bitmap, int tintColor) {
  		// tint color
  		int[] t = new int[] {
  				Color.red(tintColor),
  				Color.green(tintColor),
  				Color.blue(tintColor) };
  		
  		int width = bitmap.getWidth();
  		int height = bitmap.getHeight();
  		int[] pixels = new int[width * height];
  		bitmap.getPixels(pixels, 0, width, 0, 0, width, height);
  
  		int maxIndex = getMaxIndex(t);
  		int mintIndex = getMinIndex(t);
  		
  		for (int i=0; i<pixels.length; i++) {
  			int color = pixels[i];
  			// pixel color
  			int[] p = new int[] {
  					Color.red(color),
  					Color.green(color),
  					Color.blue(color) };
  			int alpha = Color.alpha(color);
  
  			float[] transformation = calculateTransformation(t[maxIndex], t[mintIndex], p[maxIndex], p[mintIndex]);
  			pixels[i] = Color.argb(alpha, (int)(transformation[0]*255), (int)(transformation[1]*255), 0);
  		}
  		return Bitmap.createBitmap(pixels, width, height, Bitmap.Config.ARGB_8888);
  	}
docs: Create a bitmap that contains the transformation to make to create the final
  bitmap with a new tint color. You can then call processTintTransformationMap()
  to get a bitmap with the desired tint.
  @param bitmap The original bitmap.
  @param tintColor Tint color in the original bitmap.
  @return A transformation map to be used with processTintTransformationMap(). The
  transformation values are stored in the red and green values. The alpha value is
  significant and the blue value can be ignored.