Java RGB Color Create toRGB(byte r, byte g, byte b, byte a)

Here you can find the source of toRGB(byte r, byte g, byte b, byte a)

Description

to RGB

License

Open Source License

Declaration

public static long toRGB(byte r, byte g, byte b, byte a) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static long toRGB(byte r, byte g, byte b, byte a) {
        long result = (int) r & 0xff;
        result |= ((int) g & 0xff) << 8;
        result |= ((int) b & 0xff) << 16;
        result |= ((int) a & 0xff) << 24;
        return result & 0xFFFFFFFFL;
    }//from w w  w  . j av a2s . c o  m
}

Related

  1. rgbClamp(float c)
  2. rgbComponents(int argb)
  3. rgbDistance(int color1, int color2)
  4. rgbFromColorInt(int c)
  5. rgbFromGrayscale(int grayscale)
  6. toRGB(final int r, final int g, final int b, final int a)
  7. toRGB(float h, float s, float l)
  8. toRGB(int alpha, int red, int green, int blue)
  9. toRGB(int color)