public void mixPalette(int red, int green, int blue) {
		for (int i = 0; i < palette.length; i++) {
			int r = palette[i] >> 16 & 0xff;
			r += red;
			if (r < 0)
				r = 0;
			else if (r > 255)
				r = 255;
			int g = palette[i] >> 8 & 0xff;
			g += green;
			if (g < 0)
				g = 0;
			else if (g > 255)
				g = 255;
			int b = palette[i] & 0xff;
			b += blue;
			if (b < 0)
				b = 0;
			else if (b > 255)
				b = 255;
			palette[i] = (r << 16) + (g << 8) + b;
		}
	}