Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:LabelGetLinkColor

From RoR Wiki

UI Lua API · Label functions
Version: WAR 1.4.8
Defined in Lua: interfacecore/source/windowstate.lua

Meant to return the colour of hyperlinks in a Label. The Lua function that addons call actually returns the label's text colour. See Details.

r, g, b = LabelGetLinkColor(labelName)

Arguments

labelName
string – Name of a Label window.

Returns

r, g, b
number – Colour components on a 0–255 scale. These may not be whole numbers.

Details

  • LabelGetLinkColor is defined in interfacecore/source/windowstate.lua as:
function LabelGetLinkColor( windowName )
    return LabelGetTextColor( windowName )
end
It therefore returns the same values as LabelGetTextColor, not the link colour.
  • The client function that reads the real link colour is registered as _LabelGetLinkColor. Call it directly if you need the link colour:
local r, g, b = _LabelGetLinkColor( "MyLabel" )
  • _LabelGetLinkColor returns red, green and blue multiplied by 255. The alpha channel is not returned.
  • The stock UI never calls LabelGetLinkColor.

Errors

Raised by _LabelGetLinkColor. When going through the Lua wrapper you get the LabelGetTextColor errors instead.

  • Error in function call 'LabelGetLinkColor': Window %s does not exist
  • Error in function call 'LabelGetLinkColor': Window %s is not a Label

See also