ColorSelect::GetColorRGB
function · ui · primitive
- Address
0x78ed10· 318 bytes, up to0x78ee4d- Signature
int __fastcall (lua_State *L)- Meaning
- Implements the ColorSelect method GetColorRGB, its pair in the table 0x87abb0
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/colorselect#reading-the-colour
- Test
ui::luabind_78ed10_get_color_rgb
Finding: Reading the colour in ui: ColorSelect
OnColorSelect gets the colour as red, green and blue, and GetColorRGB returns the same three:
the colour converted back to channels, each made a byte by adding 512 to v·255, rounding the sum
to a float and keeping its integer part, then divided by 255. The float holds the sum to the
nearest 1/16384, so a channel can read back one step below what SetColorRGB stored, and one
within 1/32768 below a whole step reads back as that step. GetColorHSV returns the three fields
as they are. A grey colour has no hue: converting one with saturation 0 stores the hue −1, so after
SetColorRGB of a grey GetColorHSV returns −1 as the hue.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 8
- lua_settop lua
- lua_type lua
- lua_touserdata lua
- lua_pushnumber lua
- lua_rawgeti lua
- luaL_error lua
- HsvToRgb unassigned
- PackColorBytes unassigned
Calls and jumps by a bare address, from tables/calls.tsv.