Java examples for 2D Graphics:Color RGB
get Green From RGB
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { int binaryColour = 2; System.out.println(getGreenFromRGB(binaryColour)); }/* www . ja v a2 s. c o m*/ public static int getGreenFromRGB(int binaryColour) { return (binaryColour >> 8) & 0xFF; } }