Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
Advertisement

Returns the color of the outline and circle underneath the unit.

red, green ,blue, alpha = UnitSelectionColor(UnitId[, useExtendedColors])

Arguments[]

UnitId
string - The unit whose selection colour should be returned.
useExtendedColors
boolean? - If true, a more appropriate colour of the unit's selection will be returned. For instance, if used on a dead hostile target, the default return will red (hostile), but the extended return will be grey (dead).

Returns[]

red
number - A number between 0 and 1.
green
number - A number between 0 and 1.
blue
number - A number between 0 and 1.
alpha
number - A number between 0 and 1.

Example[]

0, 0, 0.99999779462814, 0.99999779462814 = UnitSelectionColor("player")
0, 0.99999779462814, 0, 0.99999779462814 = UnitSelectionColor("target") -- a friendly npc in target

See Also[]

Advertisement