Here you can find the source of rgba(int red, int green, int blue)
Parameter | Description |
---|---|
red | the red component |
green | the green component |
blue | the blue component |
public static int rgba(int red, int green, int blue)
//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; } }