Java examples for 2D Graphics:Color RGB
Returns the blue component in the range 0-255 in the default sRGB space.
//package com.java2s; public class Main { public static void main(String[] argv) throws Exception { int rgb = 2; System.out.println(getBlue(rgb)); }// w ww.j a v a2 s. com /** * Returns the blue component in the range 0-255 in the default sRGB * space. * @return the blue component. * @see #getRGB */ public static int getBlue(int rgb) { return (rgb >> 0) & 0xFF; } }