Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
If there is an alpha then you will also want to AND the r with 0xff too (like the g).
But if there is an alpha remember that lua ints are not always 32 bit (depending on the platform), so alpha may be corrupt anyway. But you can use int64 if required.
@hgy29 Yes, I meant if he just needed the red, it will be corrupted if there is an alpha, so he should mask it off.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Comments
Likes: MoKaLux
https://deluxepixel.com
Likes: SinisterSoft, MoKaLux
Or you can use ImGui
https://github.com/MultiPain/Gideros_ImGui#color-convert
Likes: SinisterSoft
https://deluxepixel.com