Java examples for 2D Graphics:Color RGB
Extracts the blue component from color .
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { int color = 2; System.out.println(blue(color)); }/*ww w . java 2 s. com*/ /** * Extracts the blue component from {@code color}. */ public static int blue(int color) { return (color >> 16) & 0xff; } }