private static void setColor(int hue, float sat, float val, int max)
	{
		int h = 6*hue/max;
		float f = 6*(float) hue/max - h;
		float p = val*(1-sat);
		float q = val*(1-sat*f);
		float t = val*(1-sat*(1-f));
		if (h == 0 || h == 6)
			GL11.glColor4f(val,t,p,1);
		if (h == 1)
			GL11.glColor4f(q,val,p,1);
		if (h == 2)
			GL11.glColor4f(p,val,t,1);
		if (h == 3)
			GL11.glColor4f(p,q,val,1);
		if (h == 4)
			GL11.glColor4f(t,p,val,1);
		if (h == 5)
			GL11.glColor4f(val,p,q,1);
	}