title: Java color opacity
body: <p>I have a method to determine a color based on some value. The method is as such:</p>
  
  <pre><code>public Color color(double val) {
      double H = val * 0.3; 
      double S = 0.9; 
      double B = 0.9; 
      return Color.getHSBColor((float)H, (float)S, (float)B);
  }
  </code></pre>
  
  <p>I also want to make the color created trasparent. How can I do this?
  Thanks</p>