Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export_Color4 does not take into account alpha #39

Open
h3r opened this issue Feb 4, 2021 · 1 comment
Open

export_Color4 does not take into account alpha #39

h3r opened this issue Feb 4, 2021 · 1 comment

Comments

@h3r
Copy link

h3r commented Feb 4, 2021

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];
}

@flyover
Copy link
Owner

flyover commented Feb 4, 2021

Thanks for letting me know! Should be fixed in e4aeea7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants