Skip to main content

resolve_theme_layers

Function resolve_theme_layers 

pub fn resolve_theme_layers(stack: &ThemeLayerStack) -> Theme
Expand description

Resolve the stack. Order, lowest first:

  1. built-in defaults (Preset::Dark)
  2. distribution defaults, when DistributionDefaults::validate accepts them
  3. the user’s theme, except the roles the distribution pins
  4. the window (ThemeLayerStack::window): its workspace’s temperature, which moves the neutral hue only and shows nothing on a palette with chroma 0, and the person’s colour
  5. accessibility, when AccessibilityLayer::materialize accepts it: the high-contrast palette of the theme’s polarity (high contrast or forced colours), clamped text and UI scale, reduced motion, reduced transparency, thick caret, the Hyperlegible face, distinct similar letters. A rejected payload leaves the theme unchanged by this layer