Helper functions for adding transparency to colors in R and preserving the alpha channel when using colorRampPalette