int result = (color & 0xff00ffff) | red;
Change ARGB color int's single channel value
-
24-03-2022 - |
Pergunta
If I have a color:
int color = 0x1a2cf3bb; // just an example
How can I change, for examle, just the R channel with the value:
int red = 0xfe; // another example
So that color becomes:
color = 0x1afef3bb;
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow