Custom health bar

I know how to change the texture for the hearts but how can i make it so the first heart is different from the last one and etc (because if i only change the model i can't make a bar since all the textures are the same and i want the color to go from green to red or something)

Continue to help post