def create_centroid_ranges(centroids, tol=15):
    """
    Create high and low BGR values to allow for slight variations in layout
    :param centroids: legend colors identified from get_centroids
    :param tol: int, number of pixels any of B, G, R could vary by and still
    be considered part of the original centroid. Defaults to 15.
    :return: List of [low, high] bounds for each centroid
    """
    cent_bounds = []
    for c in centroids:
        b, g, r = c
        cent_bounds.append(
            [[b - tol, g - tol, r - tol], [b + tol, g + tol, r + tol]])
    return cent_bounds