question: 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 ; }
target:  Adds alpha to a hex color