local color = imgui.ImFloat3(1.0, 1.0, 1.0)
--imgui.OnDrawFrame
if imgui.ColorEdit3('test', color) then
local clr = join_argb(0, color.v[1] * 255, color.v[2] * 255, color.v[3] * 255)
print(('%06X'):format(clr))
end
function join_argb(a, r, g, b)
local argb = b -- b
argb = bit.bor(argb, bit.lshift(g, 8)) -- g
argb = bit.bor(argb, bit.lshift(r, 16)) -- r
argb = bit.bor(argb, bit.lshift(a, 24)) -- a
return argb
end