get Blue from int value Color - Java 2D Graphics

Java examples for 2D Graphics:Color RGB

Description

get Blue from int value Color

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        int color = 2;
        System.out.println(getBlue(color));
    }/*  w  w w  .  ja va2  s.  c om*/

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

Related Tutorials