Here you can find the source of RGBToInt(float[] rgb)
public static int RGBToInt(float[] rgb)
//package com.java2s; public class Main { public static int RGBToInt(float[] rgb) { byte[] argb = { (byte) 0xFF, (byte) (rgb[0] * 0xFF), (byte) (rgb[1] * 0xFF), (byte) (rgb[2] * 0xFF) }; return (argb[0] << 24) + ((argb[1] & 0xFF) << 16) + ((argb[2] & 0xFF) << 8) + (argb[3] & 0xFF); }// w w w . j a v a2s. c om }