code: static double hsva( double hue, double saturation, double value, double alpha ) {
          hue = ((hue % 360) / 360) * 360;
  
          int i = (int)Math.floor( (hue / 60) % 6 );
          double f = (hue / 60) - i;
  
          double[] vs = { value, value * (1 - saturation), value * (1 - f * saturation), value * (1 - (1 - f) * saturation) };
  
          return rgba( vs[HSVA_PERM[i][0]] * 255, vs[HSVA_PERM[i][1]] * 255, vs[HSVA_PERM[i][2]] * 255, alpha );
      }
docs: Create a color value.
  
  @param hue
  hue value
  @param saturation
  saturation
  @param value
  the value
  @param alpha
  alpha
  @return a color value as long