标签: int bit-manipulation argb
如果我有颜色:
int color = 0x1a2cf3bb; // just an example
我怎样才能改变R通道的值为:
int red = 0xfe; // another example
因此颜色变为:
color = 0x1afef3bb;
答案 0 :(得分:1)
int result = (color & 0xff00ffff) | red;