Surprisingly enough, I had this exact problem just yesterday. I would recommend using a Slider. With a slider, you can change the color of the bar image to show red at the bottom, fading into green at the top. You can't get the black space like in your examples, but it is a simple way to acheive what you're talking about. Here's the code I used:
[code]
if (Player_Healthbar.Max != Entity[player.ID].Max_Health) Player_Healthbar.Max = Entity[player.ID].Max_Health;
if (Player_Healthbar.Value != Entity[player.ID].Health) Player_Healthbar.Value = Entity[player.ID].Health;
[/code]
'Player_Healthbar' is a GUI Slider, and Entity[player.ID] is the player's ID in an array I have. A basic code looks like this:
[code]
if (Slider_HealthDisplay.Max != Max_Health) Slider_HealthDisplay.Max = Max_Health;
if (Slider_HealthDisplay.Value != Health) Slider_HealthDisplay.Value = Health;
[/code]
I hope this helps! (And, on another note, the ifs are unnecessary, but I dislkike having the game re-write something that is already true, so I added them. Also, my game eats a lot of memory, so I stop it from doing things like re-writing something that is already displayed as often as possible.)
-Regards, Akumayo