Blending color along an irregular shape

Can someone tell me how to blend colors along this irregular shape from one end to the other?  
For example gray to red.

Thank you!
Don