#Color output from code

3 messages · Page 1 of 1 (latest)

latent iron
#

This display text here is:

DPS: %c1
HPS: %c2

The code is:

    local combat = Details.GetCurrentCombat()
    local combatTime = combat:GetCombatTime()
    local myDmgNow = Details.UnitDamage("player")
    local myHealNow = Details.UnitHealing("player")
    local myDps = myDmgNow / combatTime
    local myHps = myHealNow / combatTime
    local abbr = ""
    
    
    return myDps, myHps
end

How do i make it so myDps and myHps is outputtet as the color white? so the display text color only colors "DPS:" and "HPS:"

Thanks ❤️

undone tide
#

I solved this issue this way;

return GetClassColoredTextForUnit("player", myDps)

#

Keeping just DPS as text in the display field