get Blue From RGB - Java 2D Graphics

Java examples for 2D Graphics:Color RGB

Description

get Blue From RGB

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        int rgb = 2;
        System.out.println(getBlueFromRGB(rgb));
    }// w  ww  .  j  a v  a 2  s.c  o  m

    public static int getBlueFromRGB(final int rgb) {
        return (rgb >> 0) & 0xFF;
    }
}

Related Tutorials