def _alpha(rgb, a):
    """
    Add alpha channel to a hex color.

    :param str rgb: hex color.
    :param float a: alpha channel (float between 0 and 1)
    """
    a = int(a * 255)
    return "{}{:02x}".format(rgb, a)