benilla-re systems structs docs

s_difficultyColors

global · ui

Address
0xcf60ec · 20 bytes, up to 0xcf60ff
Type
uint32_t[5]
Meaning
Holds the ARGB words red, orange, yellow, green and gray of the difficulty colour
Confidence
verified, proof one
Finding
ui/unitlevels#the-difficulty-colour

Finding: The difficulty colour in ui: unit levels and the gray range

0x7cbd50(playerLevel, unitLevel) returns the address of one of five ARGB words by the difference d = unit level less player level: d of 5 or more 0xffff1919, 3 to 4 0xffff7f3f, -2 to 2 0xffffff00; below that, 0xff3fb23f when -d is at most gap[playerLevel / 5] and 0xff7f7f7f above. The words sit in 0xcf60ec to 0xcf60fc, written once at first use.

The derivation is in the doc.