Here you can find the source of toRgb(int r, int g, int b)
public static int toRgb(int r, int g, int b)
//package com.java2s; public class Main { public static int toRgb(int r, int g, int b) { return r << 16 | g << 8 | b; }//ww w .j a v a 2s . co m }