Here you can find the source of RGBtoInt(int r, int g, int b)
Parameter | Description |
---|---|
r | red value |
g | green value |
b | blue value |
public static int RGBtoInt(int r, int g, int b)
//package com.java2s; //License from project: LGPL public class Main { /**/* ww w .j a v a 2 s .c o m*/ * Converts RGB values to an RGB integer value. * * @param r red value * @param g green value * @param b blue value * @return RGB integer */ public static int RGBtoInt(int r, int g, int b) { return (256 * 256 * r + 256 * g + b); } }