Here you can find the source of toInt(final int r, final int g, final int b)
public static int toInt(final int r, final int g, final int b)
//package com.java2s; //License from project: Open Source License public class Main { public static final int DCM_ALPHA_MASK = 0xff000000; public static int toInt(final int r, final int g, final int b) { return DCM_ALPHA_MASK | (r << 16) | (g << 8) | b; }//from www .jav a 2 s . co m }