Java examples for 2D Graphics:Color
Color from AARRGGBB
//package com.java2s; import java.awt.*; public class Main { public static void main(String[] argv) throws Exception { int aarrggbb = 2; System.out.println(fromAARRGGBB(aarrggbb)); }/*from w ww. j a va 2 s .c o m*/ public static Color fromAARRGGBB(int aarrggbb) { return new Color((aarrggbb >> 16) & 0xff, (aarrggbb >> 8) & 0xff, (aarrggbb >> 0) & 0xff, (aarrggbb >> 24) & 0xff); } }