Route config color strings through GetStringColor cache

Replace raw strsplit(",", ...) color parsing across action bars, chat,
nameplates, third-party skins, player, and roll with the cached
GetStringColor / GetStringColorObject helpers, dropping the per-build
string-table allocations they created.
This commit is contained in:
Brues
2026-08-04 22:27:43 -05:00
parent 350b1d63ae
commit fe0ec82ede
8 changed files with 36 additions and 36 deletions
+1 -1
View File
@@ -41,7 +41,7 @@ pfUI:RegisterModule("player", function ()
-- Convert "r,g,b,a" config color string to a 6-char hex string, or nil if unset
local function cfgColorToHex(colorStr)
if not colorStr or colorStr == "" then return nil end
local r, g, b = strsplit(",", colorStr)
local r, g, b = GetStringColor(colorStr)
r, g, b = tonumber(r), tonumber(g), tonumber(b)
if not r or not g or not b then return nil end
return string.format("%02X%02X%02X", r * 255, g * 255, b * 255)