Module steps

Source
Expand description

get color steps

Functionsยง

color_index
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]
get_index
get the index for a new color some steps away from a base color
get_small_widget_color
get surface color given a base and some steps
get_surface_color
get surface color given a base and some steps
get_text
get text color given a base background color
is_valid_srgb
checks that the color is valid srgb
oklch_to_srgba_nearest_chroma
find the nearest chroma which makes our color a valid color in Srgba
steps
Get an array of 100 colors with a specific hue and chroma over the full range of lightness. Colors which are not valid Srgba will fallback to a color with the nearest valid chroma.