Make 3 tga files:
- The white edge (a white irregular triangle)
- The red edge (a red irregular triangle)
- The white to red edge (where the white meets the red; two triangles of different colors)
Code 5 textures (from left to right):
- The white edge
- A white rectangle
- The white to red edge
- A red rectangle
- The red edge
You simply need to change the rectangles sizes according to the health you want to display.
On a side note, the "red to white edge" can be done programmatically by using the "white edge" and the "red edge" again (and rotating them).