int startAlpha = startColor >>> 24; int startRed = (startColor >>> 16) & 0x00FF; int startGreen = (startColor >>> 8) & 0x0000FF; int startBlue = startColor  & 0x00000FF;  int endAlpha = endColor >>> 24; int endRed = (endColor >>> 16) & 0x00FF; int endGreen = (endColor >>> 8) & 0x0000FF; int endBlue = endColor  & 0x00000FF;  int stepAlpha = ((endAlpha - startAlpha) << 8) / (steps-1); int stepRed = ((endRed -startRed) << 8) / (steps-1); int stepGreen = ((endGreen - startGreen) << 8) / (steps-1); int stepBlue = ((endBlue - startBlue) << 8) / (steps-1);     startAlpha <<= 8; startRed <<= 8; startGreen <<= 8; startBlue <<= 8;
	public static final int[] getGradient( int startColor, int endColor, int steps ) {		int startAlpha = startColor >>> 24;		int startRed = (startColor >>> 16) & 0x00FF;		int startGreen = (startColor >>> 8) & 0x0000FF;		int startBlue = startColor  & 0x00000FF;		int endAlpha = endColor >>> 24;		int endRed = (endColor >>> 16) & 0x00FF;		int endGreen = (endColor >>> 8) & 0x0000FF;		int endBlue = endColor  & 0x00000FF;				int stepAlpha = ((endAlpha - startAlpha) << 8) / (steps-1);		int stepRed = ((endRed -startRed) << 8) / (steps-1);		int stepGreen = ((endGreen - startGreen) << 8) / (steps-1);		int stepBlue = ((endBlue - startBlue) << 8) / (steps-1);//		System.out.println("step red=" + Integer.toHexString(stepRed));//		System.out.println("step green=" + Integer.toHexString(stepGreen));//		System.out.println("step blue=" + Integer.toHexString(stepBlue));				startAlpha <<= 8;		startRed <<= 8;		startGreen <<= 8;		startBlue <<= 8;				int[] gradient = new int[ steps ];		gradient[0] = startColor;		for (int i = 1; i < steps; i++) {			startAlpha += stepAlpha;			startRed += stepRed;			startGreen += stepGreen;			startBlue += stepBlue;						gradient[i] = (( startAlpha << 16) & 0xFF000000)				| (( startRed << 8) & 0x00FF0000)				| ( startGreen & 0x0000FF00)				| ( startBlue >>> 8);				//| (( startBlue >>> 8) & 0x000000FF);		}		return gradient;	}