argb to Color - Java 2D Graphics

Java examples for 2D Graphics:Color

Description

argb to Color

Demo Code


//package com.java2s;
import java.awt.Color;

public class Main {
    public static Color argb2Color(int argb) {
        return new Color((argb >> 16) & 0x000000FF,
                (argb >> 8) & 0x000000FF, argb & 0x000000FF,
                argb >> 24 & 0x000000FF);
    }/*from   w w  w  .ja  v a  2s . c  o  m*/
}

Related Tutorials