I'm writing a color changing rage bar and I have the basic function working correctly, however I want to add a function for execute and need some help.

Here's what I have so far:

function(progress, r1, g1, b1, a1, r2, g2, b2, a2)
local player_rage = UnitPower("player", 1)
local red, green, blue = 0,0,0
if player_rage > 74 then
red, green, blue = 1,.5,0
elseif player_rage > 49 then
red, green, blue =1,1,0
elseif player_rage > 24 then
red, green, blue = 0,1,1
end
return red, green, blue, 1
end

So with this current set up, bar starts black, then cyan, yellow, and finally orange as rage is above 0, 24, 49 and 74 respectively. What I would like to do is add another line for execute, but I'm running into problems. If I am understanding things correctly the below statement is what I need for the if/then section:

if player_rage >= 30 and enemy_health =< 20% then
red, green, blue = 1,0,0
elseif player_rage > 74 then
red, green, blue = 1,.5,0
elseif player_rage > 49 then
red, green, blue =1,1,0
elseif player_rage > 24 then
red, green, blue = 0,1,1

My questions are:

1) Is this statement correct or am I completely off?
2) How do I define enemy_health so it tracks my current target's health?

What I would truly love is the ability to have the original bar flash red/white when conditions are set for execute (30 rage and target below 20%), but I'll be happy with the bar just turning red.

Anyone able to assist?