get Blue from int color - Java 2D Graphics

Java examples for 2D Graphics:Color RGB

Description

get Blue from int color

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        int rgb = 2;
        System.out.println(getBlue(rgb));
    }/*  w w w. j  a  va  2 s .co  m*/

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

Related Tutorials