title: How to add rainbow gradient to an Image in android
body: <p>I want to add <strong>Transparent Rainbow or Spectrum Gradient</strong> to <code>Bitmap</code>.</p>
  
  <p>In <code>photoshop</code> it is very easy. Now I want to do it <code>programmatically</code>. I have gone through a lot of research. But gradient has only one <code>starting color</code> and one <code>ending</code>. How could I add the rainbow color(multiple color) Gradient in Android. </p>
  
  <p>Or is there a way to add that effect to bitmap in Android? Like given</p>
  
  <p><a href="https://i.stack.imgur.com/saQ63.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/saQ63.png" alt="enter image description here"></a></p>