How can I convert hex color to RGB code in Java? Mostly in Google, samples are on how to convert from RGB to hex.
Convert it to an integer, then divmod it twice by 16, 256, 4096, or 65536 depending on the length of the original hex string (3, 6, 9, or 12 respectively).