Here you can find the source of RGBToHex(int[] rgb)
public static int RGBToHex(int[] rgb)
//package com.java2s; //License from project: LGPL public class Main { public static int RGBToHex(int[] rgb) { // TODO: We should really throw some sort of error here if (rgb.length < 3) return -1; return ((rgb[0] << 16) | (rgb[1] << 8) | rgb[2]); }/*from www .j av a2 s .c om*/ }