code: private static final double[] getRGB(double hue, double saturation, double brightness) {
          double[] rgb = {0.0, 0.0, 0.0};
  
          double tmpHue = hue * 360.0;
          int hi;
          double f;
          double p, q, t;
  
          hi = (int)Math.floor(tmpHue / 60.0) % 6;
          f  = tmpHue / 60.0 - hi;
          p  = (brightness * (1.0 - saturation));
          q  = (brightness * (1.0 - saturation * f));
          t  = (brightness * (1.0 - saturation * (1.0 - f)));
  
          switch (hi) {
          case 0:
              rgb[0] = brightness;
              rgb[1] = t;
              rgb[2] = p;
              break;
          case 1:
              rgb[0] = q;
              rgb[1] = brightness;
              rgb[2] = p;
              break;
          case 2:
              rgb[0] = p;
              rgb[1] = brightness;
              rgb[2] = t;
              break;
          case 3:
              rgb[0] = p;
              rgb[1] = q;
              rgb[2] = brightness;
              break;
          case 4:
              rgb[0] = t;
              rgb[1] = p;
              rgb[2] = brightness;
              break;
          case 5:
              rgb[0] = brightness;
              rgb[1] = p;
              rgb[2] = q;
              break;
          default:
              break;
          }
  
          return rgb;
      }
docs: Convert HSB (Hue, Saturation, Brightness) to RGB values.
  
  @param hue
  @param saturation
  @param brightness
  
  @return
  RGB values.