Java Color Convert To colorToRGB(final int alpha, final int red, final int green, final int blue)

Here you can find the source of colorToRGB(final int alpha, final int red, final int green, final int blue)

Description

color To RGB

License

Apache License

Declaration

private static int colorToRGB(final int alpha, final int red,
            final int green, final int blue) 

Method Source Code

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

public class Main {
    private static int colorToRGB(final int alpha, final int red,
            final int green, final int blue) {
        int newPixel = 0;
        newPixel += alpha;/*from  www  .  j  a  v  a  2  s .co  m*/
        newPixel = newPixel << 8;
        newPixel += red;
        newPixel = newPixel << 8;
        newPixel += green;
        newPixel = newPixel << 8;
        newPixel += blue;
        return newPixel;
    }
}

Related

  1. colorToFloat(int color)
  2. colorToHex(int color)
  3. colorToHex(int integer)
  4. colorToString(int color, boolean rgb)
  5. colorToStringHex(int red, int green, int blue)