I think you need a thin one. If so, using the ColorFilterGenerator suggested in Understanding the Use of ColorMatrix and ColorMatrixColorFilter to Change the Tint of a Drawing, you just need to do:
view.getBackground().setColorFilter(ColorFilterGenerator.adjustHue(180));
The result is as follows (the hue is rotated 180 degrees):

Note: All credits for this answer should be sent to @Richard Lalancette for his wonderful answer to the question I related
Comment update:
As you need to specify the target color, you can calculate the source and target HSV values โโand use the ColorFilterGenerator to change the hue. For instance:
// Your source color (The RGB color from your original image is 255,85,78) float[] hsvSource = new float[3]; Color.RGBToHSV(255, 85, 78, hsvSource); // The color whose hue you want to achieve (green for example) float[] hsvTarget = new float[3]; Color.RGBToHSV(0, 200, 18, hsvTarget); view.getBackground().setColorFilter(ColorFilterGenerator.adjustHue(hsvTarget[0] - hsvSource[0]));
Please note that this approach only takes into account the hue values โโof the colors for changing it.
Comment update:
@ A wonderful answer by Jared Rummler ( Understanding the use of ColorMatrix and ColorMatrixColorFilter to change the hue of a drawing ) takes your drawable as a parameter, so you don't need to specify the source color:
view.getBackground().setColorFilter(ColorFilterGenerator.from(view.getBackground()).to(Color.GREEN));
source share