Java Color Create color(int red, int green, int blue, int alpha)

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

Description

Puts back the four color components into a integer representation

License

Open Source License

Declaration

public static int color(int red, int green, int blue, int alpha) 

Method Source Code

//package com.java2s;
/* Copyright (c) 2001, 2007 TOPP - www.openplans.org. All rights reserved.
 * This code is licensed under the GPL 2.0 license, availible at the root
 * application directory.//  w  ww . j  ava  2  s . c o m
 */

public class Main {
    /**
     * Puts back the four color components into a integer representation
     */
    public static int color(int red, int green, int blue, int alpha) {
        return ((alpha & 0xFF) << 24) | ((red & 0xFF) << 16)
                | ((green & 0xFF) << 8) | ((blue & 0xFF) << 0);
    }
}

Related

  1. color(float red, float green, float blue)
  2. Color(int index)
  3. color(int val)
  4. color(String color)
  5. color(String color, Object value)
  6. color(String msg)