https://kotlinlang.org logo
#android
Title
# android
m

miha-x64

11/18/2016, 4:05 PM
get blue brightness:
blue = color & 0xFF
set:
color &= (int) 0xFFFFFF00; color |= blue;
get yellow brightness:
Copy code
red = (color & 0xFF0000) >> 16;
green = (color & 0x00FF00) >> 8;
yellow = (red + green) / 2;
set yellow brightness:
Copy code
color &= (int) 0xFF0000FF;
color |= (yellow << 16);
color |= (yellow << 8);