get Green From RGB - Java 2D Graphics

Java examples for 2D Graphics:Color RGB

Description

get Green From RGB

Demo Code


//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;
    }
}

Related Tutorials