WoW:API GetQuestDifficultyColor: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Created page with '{{wowapi}} __NOTOC__ Gets the difficulty colour for a given level compared to the player's level. colour = GetQuestDifficultyColor(level) == Arguments == :;level : Number - ...')
 
m (Move page script moved page API GetQuestDifficultyColor to API GetQuestDifficultyColor without leaving a redirect)
 
(No difference)

Latest revision as of 04:46, 15 August 2023

WoW API < GetQuestDifficultyColor


Gets the difficulty colour for a given level compared to the player's level.

colour = GetQuestDifficultyColor(level)


Arguments[edit]

level
Number - The level to be compared to the player's current level.


Returns[edit]

colour
Table - A table containing the RGB value of the resulting colour.
  • "r" - The red channel of the colour. Ranging from 0.0 to 1.0
  • "g" - The green channel of the colour. Ranging from 0.0 to 1.0
  • "b" - The blue channel of the colour. Ranging from 0.0 to 1.0


Example[edit]

local colour = GetQuestDifficultyColor(47);
DEFAULT_CHAT_FRAME:AddMessage("Your difficulty colour against a target of level 47.", colour.r, colour.g, colour.b);

Details[edit]

Changed from GetDifficultyColor to GetQuestDifficultyColor in Patch 3.2