Java examples for 2D Graphics:Color RGB
get Green from int value Color
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { int color = 2; System.out.println(getGreen(color)); }/*w w w .j a va 2 s . c o m*/ public static int getGreen(int color) { return (color >> 8) & 0xFF; } }