def _add_transparency(foreground_rgb_colour, background_rgb_colour, opacity):
    """Adds transparency to foreground colour.

    :param foreground_rgb_colour: Foreground colour (length-3 numpy array).
    :param background_rgb_colour: Background colour (length-3 numpy array).
    :param opacity: Opacity (in range 0...1).
    :return: foreground_rgb_colour: New foreground colour (length-3 numpy array
        with transparency built in).
    """

    return (
        foreground_rgb_colour * opacity + background_rgb_colour * (1. - opacity)
    )