Take a look at power.lua and health.lua in oUF\elements.
power
Code:
The following settings are listed by priority:
- colorTapping
- colorDisconnected
- colorHappiness
- colorPower
- colorClass (Colors player units based on class)
- colorClassPet (Colors pet units based on class)
- colorClassNPC (Colors non-player units based on class)
- colorReaction
- colorSmooth - will use smoothGradient instead of the internal gradient if set.
and health
Code:
Shared:
The following settings are listed by priority:
- colorTapping
- colorDisconnected
- colorHappiness
- colorClass (Colors player units based on class)
- colorClassPet (Colors pet units based on class)
- colorClassNPC (Colors non-player units based on class)
- colorReaction
- colorSmooth - will use smoothGradient instead of the internal gradient if set.
- colorHealth
To increase the updating
Code:
- frequentUpdates - do OnUpdate polling of health data.
example
Code:
self.Power.frequentUpdates = true
self.Power.colorHappiness = true
self.Power.colorClass = true
This will class color the power bar, happiness color if it's the player's pet and frequent updates are enabled.