Java examples for 2D Graphics:Color RGB
mask Color ARGB Transparency
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { int color = 2; System.out.println(maskARGBTransparency(color)); }//from www . j a v a 2 s . com public static int maskARGBTransparency(int color) { int transparencyMask = 0xff << 24; return transparencyMask | color; } }