Java RGB Color Create rgb(int a, int r, int g, int b)

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

Description

rgb

License

Open Source License

Declaration

private static int rgb(int a, int r, int g, int b) 

Method Source Code

//package com.java2s;
/*/*from   ww  w . java2s .  c o m*/
 * Copyright (C) 2011 Sony Ericsson Mobile Communications AB
 * Copyright (C) 2012-2013 Sony Mobile Communications AB
 *
 * This file is part of ChkBugReport.
 *
 * ChkBugReport is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 2 of the License, or
 * (at your option) any later version.
 *
 * ChkBugReport is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ChkBugReport.  If not, see <http://www.gnu.org/licenses/>.
 */

public class Main {
    private static int rgb(int a, int r, int g, int b) {
        int ret = 0;
        ret |= (a & 0xff) << 24;
        ret |= (r & 0xff) << 16;
        ret |= (g & 0xff) << 8;
        ret |= (b & 0xff) << 0;
        return ret;
    }
}

Related

  1. makeRgbImage(int[][] rbgImage)
  2. msAccesToRGBa(int code)
  3. newRGBImage(int[] rgb, int width, int height, boolean processAlpha)
  4. RGB(float R, float G, float B)
  5. rgb(float rIn, float gIn, float bIn)
  6. rgb(int argb)
  7. rgb(int pixel)
  8. rgb(int r, int g, int b)
  9. rgb(int red, int green, int blue)