cosmic::cosmic_theme::steps

Function color_index

source
pub fn color_index<C>(c: C, array_len: usize) -> usize
where Alpha<Oklch, f32>: FromColor<C>,
Expand description

get the index into the steps array for a given color the index is the lightness value of the color converted to Oklcha, scaled to the range [0, 100]