Java examples for 2D Graphics:Color
Extracts the green component from color .
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { int color = 2; System.out.println(green(color)); }//ww w .j av a 2s . c o m /** * Extracts the green component from {@code color}. */ public static int green(int color) { return (color >> 8) & 0xff; } }