public void setHSV(int h, int s, int v) {
		// based on MochiKit implementation by Bob Ippolito
		// h,s,v ranges are < 0.0 - 1.0 >

		int r = 0, g = 0, b = 0, i, f, p, q, t;

		if (v == 0.0) {

			r = g = b = 0;

		} else {

			i = (int) Math.floor(h*6);
			f = (h * 6) - i;
			p = v * (1 - s);
			q = v * (1 - (s * f));
			t = v * (1 - (s * (1 - f)));

			switch (i) {

				case 1: r = q; g = v; b = p; break;
				case 2: r = p; g = v; b = t; break;
				case 3: r = p; g = q; b = v; break;
				case 4: r = t; g = p; b = v; break;
				case 5: r = v; g = p; b = q; break;
				case 6: // fall through
				case 0: r = v; g = t; b = p; break;

			}

		}

		this.setRGB(r,g,b);
	};