plushie/prop/theme

Theme type for application appearance.

Maps to named themes supported by the Rust binary. Wire format is a lowercase string with underscores separating words. Custom themes are dictionaries that the renderer parses into an iced::Theme::custom() palette.

Types

pub type Theme {
  Light
  Dark
  Dracula
  Nord
  SolarizedLight
  SolarizedDark
  GruvboxLight
  GruvboxDark
  CatppuccinLatte
  CatppuccinFrappe
  CatppuccinMacchiato
  CatppuccinMocha
  TokyoNight
  TokyoNightStorm
  TokyoNightLight
  KanagawaWave
  KanagawaDragon
  KanagawaLotus
  Moonfly
  Nightfly
  Oxocarbon
  Ferra
  SystemTheme
  Custom(dict.Dict(String, node.PropValue))
}

Constructors

  • Light
  • Dark
  • Dracula
  • Nord
  • SolarizedLight
  • SolarizedDark
  • GruvboxLight
  • GruvboxDark
  • CatppuccinLatte
  • CatppuccinFrappe
  • CatppuccinMacchiato
  • CatppuccinMocha
  • TokyoNight
  • TokyoNightStorm
  • TokyoNightLight
  • KanagawaWave
  • KanagawaDragon
  • KanagawaLotus
  • Moonfly
  • Nightfly
  • Oxocarbon
  • Ferra
  • SystemTheme
  • Custom(dict.Dict(String, node.PropValue))

Values

pub fn custom(
  name: String,
  palette: dict.Dict(String, node.PropValue),
) -> Theme

Build a custom theme palette map.

The returned dict is passed through to the Rust renderer, which uses it to construct an iced::Theme::custom() with a modified Palette.

Common keys: “name” (string, required), “base” (built-in theme string), “background”, “text”, “primary”, “success”, “danger”, “warning” (hex strings). Shade override keys like “primary_strong”, “background_weakest”, “primary_strong_text” are also accepted.

pub fn to_prop_value(t: Theme) -> node.PropValue

Encode a Theme to its wire-format PropValue.

pub fn to_string(t: Theme) -> String

Convert a Theme to its wire-format string representation.

Search Document