Java tutorial
//package com.java2s; public class Main { public static int[] getNativeColor(String colorString) { String color = colorString.substring(1); int[] ret = new int[3]; for (int i = 0; i < 3; i++) { ret[i] = Integer.parseInt(color.substring(i * 2, i * 2 + 2), 16); } return ret; } }