← Back

Salience Palette

Salience.solve [intermediate]

H-K salience colour solver: lightness solved per tier against the detected ground

Salience Palette Demo

H-K salience colour solver: lightness solved per tier against the detected ground

For the full interactive experience:

$ mix raxol.playground

Code
defp tier_row(seed, tier, ground_l, selected?) do
  hex = Salience.solve(tier, seed.c, seed.h, ground: ground_l)
  prefix = if selected?, do: "> ", else: "  "

  row style: %{gap: 1} do
    [
      text(prefix <> String.pad_trailing(Atom.to_string(tier), 14)),
      swatch(hex, hex)
    ]
  end
end
demo j/k prev/next / focus demo esc back 36/42 demos