Java RGB Color Create rgba(int red, int green, int blue)

Here you can find the source of rgba(int red, int green, int blue)

Description

Returns the RGB color as int.

License

Open Source License

Parameter

Parameter Description
red the red component
green the green component
blue the blue component

Return

the RGB color as int

Declaration

public static int rgba(int red, int green, int blue) 

Method Source Code

//package com.java2s;
//License from project: GNU General Public License 

public class Main {
    /**//from w  w  w.  j  a  va  2 s .  c  o  m
     * Returns the RGB color as int.
     *
     * @param red the red component
     * @param green the green component
     * @param blue the blue component
     * @return the RGB color as int
     */
    public static int rgba(int red, int green, int blue) {
        int rgba = 255;
        rgba = (rgba << 8) + red;
        rgba = (rgba << 8) + green;
        rgba = (rgba << 8) + blue;
        return rgba;
    }
}

Related

  1. RGB_PNSR(int[] rgb1, int[] rgb2)
  2. rgb_xyz(double r)
  3. rgba(double r, double g, double b, double a)
  4. RGBA(int r, int g, int b, float a)
  5. RGBA(int r, int g, int b, int a)
  6. rgba_bilinear_filter(int rgb00, int rgb01, int rgb10, int rgb11, int u, int v)
  7. rgbaColour(int red, int green, int blue, int alpha)
  8. RGBAequals(float[] rgba1, float[] rgba2, float eps)
  9. RGBAFromHEX(String stringValue)