The following should cover cases where the unit counts for all players who tap it.
This is just to play on the side of safety, not that you ignore something that you did not have to.
Code:
if UnitIsTapped("target") and not UnitIsTappedByAllThreatList("target") and not UnitIsTappedByPlayer("target") then
return 0x58/0xff, 0x58/0xff, 0x58/0xff, 1
else
return 1, 0, 0, 1
end
Forgive my bad syntax but I have not used WeakAuras in a while. I had all these in mine when I made a UI using only WeakAuras... only problem was not being able to interact with frames.
Code:
-- power types
local r, g, b = PowerBarColor[UnitPowerType("target")]
return r, g, b, 1
Code:
-- class colors
local r, g, b = RAID_CLASS_COLORS[UnitClass("target")]
return r, g, b, 1