Skip to main content

Module theme

Module theme 

Source
Expand description

Visual vocabulary shared by every renderer: color and status glyphs.

The theme layer resolves how output looks against the environment and user preference, independent of what is being rendered:

  • color — a semantic Palette (success/error/warn/info/dim/bold) that honours NO_COLOR and TTY detection.
  • glyph — a semantic Glyphs set (✓ ✗ ⚠ ℹ • → …) with a pure-ASCII fallback for terminals without UTF-8 support.

Both resolve from a single boolean so callers render identically regardless of terminal capability, and both expose an env-free constructor for deterministic tests.

Re-exports§

pub use color::ColorChoice;
pub use color::NO_COLOR_ENV;
pub use color::Palette;
pub use color::no_color_env_set;
pub use color::resolve_color;
pub use color::resolve_color_with;
pub use glyph::Glyphs;
pub use glyph::UTF8_LOCALE_ENVS;
pub use glyph::unicode_env_enabled;

Modules§

color
Semantic terminal color with standard opt-out.
glyph
Semantic status glyphs with a pure-ASCII fallback.