int r = (rgb >> 16)& 0xff;
int g = (rgb >> 8) & 0xff;
int b = rgb & 0xff;

因为取八位的值,所以用 0xff ,1111 1111 八个1,那么只取