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

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

Description

rgb To Color

License

Apache License

Declaration

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

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static int rgbToColor(int r, int g, int b) {
        return argbToColor(255, r, g, b);
    }// w w  w.j av a  2s  . c om

    public static int argbToColor(int a, int r, int g, int b) {
        return (((a & 0xFF) << 24) | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | (b & 0xFF));
    }
}

Related

  1. RGBAtoI(byte r, byte g, byte b, byte a)
  2. rgbBitfieldToString(int rgb)
  3. rgbToBgr(final byte[] pixels)
  4. RGBtoBGR(String color)
  5. rgbToBlackWhite(int pix, int threshold)
  6. rgbToDecimal(int r, int g, int b)
  7. rgbToGray(int colorIn)
  8. rgbToGray(int pixels)
  9. RgbToGray(int r, int g, int b)