[][src]Function kmeans_colors::sort_indexed_colors_lab

pub fn sort_indexed_colors_lab(
    centroids: &Vec<Lab>,
    indices: &[u8]
) -> Vec<(Lab, f32, u8)>

Sorts the Lab centroids by luminosity and calculates the percentage of each color in the buffer. Returns a vector of tuples sorted from darkest to lightest holding a centroid, its percentage, and the index of the centroid.