FontMethods::SetTextColor
function · ui · primitive
- Address
0x79f4d0· 430 bytes, up to0x79f67d- Meaning
- Sets the text colour of a font object from clamped red, green, blue and alpha arguments
- Confidence
- verified, proof one
- Finding
- ui/fontmethods#setting-colours
Finding: Setting colours in ui: font accessors from Lua
The setters take red, green and blue as arguments 2 to 4 and an optional alpha as 5. Each channel is clamped to 0 to 1 (below 0
gives 0; above 1 or not a number gives 1) and a missing alpha is 1. The three colour channels are rounded to a float; the alpha is
not. Each channel is then multiplied by 255, increased by 0.5 and truncated, and the bytes are packed as 0xAARRGGBB. A colour
equal to the stored one with its set bit 0x400 already set (0x79f65a) skips only the store and the OR of 0x404; the font still stops following its Font object for that group and is told through slot +0x14 either way.
The derivation is in the doc.
Callers 5
- ScrollingMessageFrame::SetTextColor ui
- MessageFrame::SetTextColor ui
- SimpleHTML::SetTextColor ui
- EditBox::SetTextColor ui
- FontInstance::SetTextColor ui
Callees 3
- __ftol crt
- lua_isnumber lua
- lua_tonumber lua
Calls and jumps by a bare address, from tables/calls.tsv.