Java RGB Color Convert To RGBtoInt(int r, int g, int b)

Here you can find the source of RGBtoInt(int r, int g, int b)

Description

Converts RGB values to an RGB integer value.

License

LGPL

Parameter

Parameter Description
r red value
g green value
b blue value

Return

RGB integer

Declaration

public static int RGBtoInt(int r, int g, int b) 

Method Source Code

//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);
    }
}

Related

  1. RGBtoHSV(int red, int green, int blue)
  2. RGBToHSV(int red, int green, int blue, float[] hsv)
  3. rgbToHsv(int rgb)
  4. RGBtoHTML(int rgb)
  5. RGBToInt(float[] rgb)
  6. RGBtoInt(int red, int green, int blue)
  7. RGBtoInt(String rgb)
  8. RGBToInteger(int red, int green, int blue)
  9. rgbToShort(int rgb)