Skip to main content

Module theme

Module theme 

Source
Expand description

ftui theme system for cass.

Bridges the existing ThemePalette color definitions to ftui’s Theme, StyleSheet, and ColorProfile infrastructure so every widget draws from the same token source.

§Design goals

  • Single source of truth: all panes consume styles from CassTheme.
  • Terminal-aware: truecolor terminals get the premium palette; 8/16-color and mono terminals get safe automatic fallbacks via ColorProfile.
  • Env-var overrides: respects NO_COLOR, CASS_NO_COLOR, CASS_NO_ICONS, CASS_NO_GRADIENT, CASS_DISABLE_ANIMATIONS, and CASS_A11Y.
  • Preset cycling: all nineteen ThemePreset variants produce a valid ftui Theme.

Modules§

style_ids
Well-known style names registered in the StyleSheet.

Structs§

CassTheme
Central theme object consumed by every ftui widget in cass.
ThemeFlags
Runtime feature flags derived from environment variables.

Functions§

dim_color
Dim a color by multiplying its RGB channels by factor (0.0=black, 1.0=original).
lerp_color
Smoothly interpolate between two ftui Colors.
lerp_u8
Linear interpolation between two u8 values.