Here you can find the source of rgb(int red, int green, int blue)
public static int rgb(int red, int green, int blue)
//package com.java2s; //License from project: LGPL public class Main { public static int rgb(int red, int green, int blue) { int color = 0; color |= 0xFF000000;//from w ww . ja v a 2 s . com color |= (red & 0xFF) << 16; color |= (green & 0xFF) << 8; color |= blue & 0xFF; return color; } }