Java examples for 2D Graphics:Color RGB
Color to Red
//package com.java2s; public class Main { public static int toRed(int rgb) { int r = (rgb >> 16) & 0xFF; return r; }//from ww w .ja v a 2 s . c o m }