rskit_cli/theme/mod.rs
1//! Visual vocabulary shared by every renderer: color and status glyphs.
2//!
3//! The theme layer resolves *how* output looks against the environment and user
4//! preference, independent of *what* is being rendered:
5//!
6//! - [`color`] — a semantic [`Palette`] (success/error/warn/info/dim/bold) that
7//! honours [`NO_COLOR`] and TTY detection.
8//! - [`glyph`] — a semantic [`Glyphs`] set (✓ ✗ ⚠ ℹ • → …) with a pure-ASCII
9//! fallback for terminals without UTF-8 support.
10//!
11//! Both resolve from a single boolean so callers render identically regardless
12//! of terminal capability, and both expose an env-free constructor for
13//! deterministic tests.
14//!
15//! [`NO_COLOR`]: https://no-color.org
16
17pub mod color;
18pub mod glyph;
19
20pub use color::{
21 ColorChoice, NO_COLOR_ENV, Palette, no_color_env_set, resolve_color, resolve_color_with,
22};
23pub use glyph::{Glyphs, UTF8_LOCALE_ENVS, unicode_env_enabled};