// Import shared types
import Color from '../types/Color';

/**
 * Get a css color based on a color object and opacity
 * @author Jackson Parsells
 * @param color the color object
 * @param opacity opacity of the color
 * @returns the css color as a string
 */
const getRGBA = (color: Color, opacity: number) => {
  return `rgba(${color.r}, ${color.g}, ${color.b}, ${opacity})`;
};

export default getRGBA;
