public static int[] HSBtoRGB(float hue, float saturation, float brightness)
{
	if (saturation == 0)
	return convert(brightness, brightness, brightness, 0);
	
	hue = hue - (float) Math.floor(hue);
	int i = (int) (6 * hue);
	float f = 6 * hue - i;
	float p = brightness * (1 - saturation);
	float q = brightness * (1 - saturation * f);
	float t = brightness * (1 - saturation * (1 - f));
	switch (i)
	{
		case 0:
			return convert(brightness, t, p, 0);
		case 1:
			return convert(q, brightness, p, 0);
		case 2:
			return convert(p, brightness, t, 0);
		case 3:
			return convert(p, q, brightness, 0);
		case 4:
			return convert(t, p, brightness, 0);
		default:
			return convert(brightness, p, q, 0);
		
	}
}