Code:
local PET_COLOR = { r = 157/255, g = 197/255, b = 255/255 }
hooksecurefunc("UnitFrame_Update", function(self)
if not self.name then return end
local unit, color = self.unit
if UnitPlayerControlled(unit) then
if UnitIsPlayer(unit) then
local _, class = UnitClass(unit)
color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class]
else
color = PET_COLOR
end