Check r[3] instead of table.getn in rgbhex

Replace table.getn(r) >= 3 with r[3] ~= nil in api/api.lua
This commit is contained in:
Brues
2026-07-29 14:35:44 -05:00
parent 6f36da7aa1
commit ea37f41db1
+1 -1
View File
@@ -1040,7 +1040,7 @@ function pfUI.api.rgbhex(r, g, b, a)
if type(r) == "table" then
if r.r then
_r, _g, _b, _a = r.r, r.g, r.b, (r.a or 1)
elseif table.getn(r) >= 3 then
elseif r[3] ~= nil then
_r, _g, _b, _a = r[1], r[2], r[3], (r[4] or 1)
end
elseif tonumber(r) then