Java examples for 2D Graphics:Color RGB
get Red
//package com.java2s; public class Main { public static float getRed(int Color) { float Red = (float) (Color >> 16 & 255) / 255.0F; return Red * 1.0F; }//from w w w. j av a2 s . c o m }