Here you can find the source of toRGB(int color)
public static int[] toRGB(int color)
//package com.java2s; //License from project: Apache License public class Main { public static int[] toRGB(int color) { int[] rgb = new int[3]; toRGB(color, rgb);/*from ww w . j a v a 2 s.c o m*/ return rgb; } public static void toRGB(int color, int[] rgb) { rgb[0] = (color >> 16) & 0xff; rgb[1] = (color >> 8) & 0xff; rgb[2] = (color >> 0) & 0xff; } }