rgb to int java code example
Example: java rgb color to int
//If your RGB values are in form of a float percentage between
//0 and 1 consider the following method:
public int getIntFromColor(float Red, float Green, float Blue){
int R = Math.round(255 * Red);
int G = Math.round(255 * Green);
int B = Math.round(255 * Blue);
R = (R << 16) & 0x00FF0000;
G = (G << 8) & 0x0000FF00;
B = B & 0x000000FF;
return 0xFF000000 | R | G | B;
}