Java examples for 2D Graphics:Color
Color To Integer
//package com.java2s; import java.awt.Color; public class Main { /**/*from w ww. ja v a 2 s . c o m*/ * * @param c * @return */ public static Integer ColorToInteger(Color c) { int i = 0; int r = ((c.getRed()) & 0xff); i |= r; i |= (c.getGreen() << 8) | (c.getBlue() << 16); return i; } }