Get blue from hex Color - Java 2D Graphics

Java examples for 2D Graphics:Color RGB

Description

Get blue from hex Color

Demo Code


//package com.java2s;

public class Main {
    public static void main(String[] argv) throws Exception {
        int parHex = 2;
        System.out.println(getBlue(parHex));
    }// w  w  w .j a v  a 2  s  .  c  om

    /**Get blue from hex*/
    public static int getBlue(int parHex) {
        return parHex & 0xFF;
    }
}

Related Tutorials