public static String addAlpha(String originalColor,double alpha){
  long alphaFixed=Math.round(alpha * 255);
  String alphaHex=Long.toHexString(alphaFixed);
  if (alphaHex.length() == 1) {
    alphaHex="0" + alphaHex;
  }
  originalColor=originalColor.replace("#","#" + alphaHex);
  return originalColor;
}

public static String addAlpha ( String originalColor , double alpha ) { long alphaFixed = Math . round ( alpha * 255 ) ; String alphaHex = Long . toHexString ( alphaFixed ) ; if ( alphaHex . length ( ) == 1 ) { alphaHex = "0" + alphaHex ; } originalColor = originalColor . replace ( "#" , "#" + alphaHex ) ; return originalColor ; }
adds alpha to a hex color
