code: public static void hsvToRgb( double h , double s , double v , double []rgb ) {
  		if( s == 0 ) {
  			rgb[0] = v;
  			rgb[1] = v;
  			rgb[2] = v;
  			return;
  		}
  		h /= d60_F64;
  		int h_int = (int)h;
  		double remainder = h - h_int;
  		double p = v * ( 1 - s );
  		double q = v * ( 1 - s * remainder );
  		double t = v * ( 1 - s * ( 1 - remainder ) );
  
  		if( h_int < 1 ) {
  			rgb[0] = v;
  			rgb[1] = t;
  			rgb[2] = p;
  		} else if( h_int < 2 ) {
  			rgb[0] = q;
  			rgb[1] = v;
  			rgb[2] = p;
  		} else if( h_int < 3 ) {
  			rgb[0] = p;
  			rgb[1] = v;
  			rgb[2] = t;
  		} else if( h_int < 4 ) {
  			rgb[0] = p;
  			rgb[1] = q;
  			rgb[2] = v;
  		} else if( h_int < 5 ) {
  			rgb[0] = t;
  			rgb[1] = p;
  			rgb[2] = v;
  		} else {
  			rgb[0] = v;
  			rgb[1] = p;
  			rgb[2] = q;
  		}
  	}
docs: Convert HSV color into RGB color
  
  @param h Hue [0,2*PI]
  @param s Saturation [0,1]
  @param v Value
  @param rgb (Output) RGB value