WoW:API GetThreatStatusColor: Difference between revisions

slight formatting updates
(Cleanup, add details on return values for each threat level)
(slight formatting updates)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
 
Returns RGB color values corresponding to a threat status returned by [[API UnitThreatSituation|UnitThreatSituation]]Added in [[Patch 3.0]].
Returns RGB color values relating to a threat status.  New in [[Patch 3.0]].
  r, g, b = GetThreatStatusColor(statusIndex)
 
  r, g, b = GetThreatStatusColor([[API TYPE ThreatStatus|status]])


==Arguments==
==Arguments==
:;status : integer - the [[API TYPE ThreatStatus|threat status]] value to get colors for
;status : integer - the [[API TYPE ThreatStatus|threat status]] value to get colors for


==Returns==
==Returns==
:;r : number - a value between 0 and 1 for the red content of the color
;r : number - a value between 0 and 1 for the red content of the color
:;g : number - a value between 0 and 1 for the green content of the color
;g : number - a value between 0 and 1 for the green content of the color
:;b : number - a value between 0 and 1 for the blue content of the color
;b : number - a value between 0 and 1 for the blue content of the color


==Example==
==Example==
Line 26: Line 24:
==Notes==
==Notes==
As of [[Patch 3.0.9]], the following r, g, b values are returned for each threat level:
As of [[Patch 3.0.9]], the following r, g, b values are returned for each threat level:
:;0 : 0.69, 0.69, 0.69
: '''0''': <span style="color: #AFAFAF">0.69, 0.69, 0.69</span>
:;1 : 1, 1, 0.47
: '''1''': <span style="color: #FFFF77">1, 1, 0.47</span>
:;2 : 1, 0.6, 0
: '''2''': <span style="color: #FF9900">1, 0.6, 0</span>
:;3 : 1, 0, 0
: '''3''': <span style="color: #FF0000">1, 0, 0</span>


==See also==
==See also==
 
* [[API UnitThreatSituation]]  
[[API UnitThreatSituation]] | [[API UnitDetailedThreatSituation]]
* [[API UnitDetailedThreatSituation]]


[[Category:Interface customization]]
[[Category:Interface customization]]
[[Category:World of Warcraft API]]
[[Category:World of Warcraft API]]