imgui-js
imgui-js copied to clipboard
export_Color4 does not take into account alpha
I noticed the color edit and color picker are not working properly for alpha channel. After exploring a bit I found the issue, the 4th channel is missing on the export function export_Color4(tuple, col) and after adding it works! :D
function export_Color4(tuple, col) { if (Array.isArray(col)) { col[0] = tuple[0]; col[1] = tuple[1]; col[2] = tuple[2]; col[3] = tuple[3]; return; } if ("r" in col) { col.r = tuple[0]; col.g = tuple[1]; col.b = tuple[2]; col.a = tuple[3]; return; } col.x = tuple[0]; col.y = tuple[1]; col.z = tuple[2]; col.w = tuple[3]; }
Thanks for letting me know! Should be fixed in e4aeea79e8c30d03803aa7782b34ddaffe9e6939.