I'm using PitBull4 for my unit frames, and I've been trying to figure out how to get the health text to be health colored and the power text the color of the characters power using PB4's Lua texts. I've tried a few things, but only get errors. I found an example somewhere to color my characters' level by class, but can't seem to find anything about health color or power color.
What I'm using at the moment:
Class colored level:
if UnitIsPlayer(unit) then
local cr,cg,cb = ClassColor(unit)
Health (which is always bright green, but I want the color to change as the health goes down, if possible):
Power (which I'd like to be power colored):
The characters' name is just fine in white, and this is what I use for that:
return '%s %s%s%s',Name(unit),Angle(AFK(unit) or DND(unit))
I have posted a similar question on the WoWAce PitBull forum (Post), but I am posting it here, also, to try to get a "broader audience", as it were. Hopefully, someone can help me with this problem.