from RGBA - Java 2D Graphics

Java examples for 2D Graphics:Color RGB

Description

from RGBA

Demo Code


//package com.java2s;

public class Main {
    public static int fromRGBA(int r, int g, int b, int a) {
        return (a & 255) << 24 | (r & 255) << 16 | (g & 255) << 8 | b & 255;
    }//from w  w  w  .  j a  v  a  2s  . co m
}

Related Tutorials