Module cosmic::cosmic_theme::steps

source ·
Expand description

get color steps

Functions§

  • 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 the index for a new color some steps away from a base color
  • get surface color given a base and some steps
  • get text color given a base background color
  • checks that the color is valid srgb
  • find the nearest chroma which makes our color a valid color in Srgba
  • 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.