Here you can find the source of color(int red, int green, int blue, int alpha)
public static int color(int red, int green, int blue, int alpha)
//package com.java2s; /* Copyright (c) 2001, 2007 TOPP - www.openplans.org. All rights reserved. * This code is licensed under the GPL 2.0 license, availible at the root * application directory.// w ww . j ava 2 s . c o m */ public class Main { /** * Puts back the four color components into a integer representation */ public static int color(int red, int green, int blue, int alpha) { return ((alpha & 0xFF) << 24) | ((red & 0xFF) << 16) | ((green & 0xFF) << 8) | ((blue & 0xFF) << 0); } }