Java tutorial
//package com.java2s; public class Main { public static Integer[] getColorRGB(String hex) { return new Integer[] { Integer.valueOf(hex.substring(0, 2), 16), Integer.valueOf(hex.substring(2, 4), 16), Integer.valueOf(hex.substring(4, 6), 16) }; } }