Assuming this is a string:
// edited to support big numbers bigger than 0x80000000
int color = (int)Long.parseLong(myColorString, 16);
int r = (color >> 16) & 0xFF;
int g = (color >> 8) & 0xFF;
int b = (color >> 0) & 0xFF;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…