def _best_color_match(orig_color, colors):
    """
    Match provided color for closed match in colors list, and return it's
    index and delta (which indicates similarity)
    """
    delta = 0
    src_r, src_g, src_b = orig_color
    rgb_diff = 195075
    for idx, (pal_r, pal_g, pal_b) in enumerate(colors):
        partial_delta = (src_r - pal_r) ** 2 + (src_g - pal_g) ** 2 + (src_b -
            pal_b) ** 2
        if partial_delta == 0:
            delta = partial_delta
            color2use = idx
            break
        if rgb_diff > partial_delta:
            rgb_diff = partial_delta
            delta = rgb_diff
            color2use = idx
    return color2use, delta
