How can we draw a texture with a gradient interpolating between two colors on runtime?
That’s not how DrawTexture works. You need a texture. You can procedurally create that gradient with SetPixel, but the Apply function is expensive.
You could, however, use GL to draw a quad with a different color on each vertices.