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 preference,
4//! independent of *what* is being rendered:
5//!
6//! - [`color`] — a semantic [`Palette`] (success/error/warn/info/dim/bold) that honours [`NO_COLOR`]
7//! and TTY detection.
8//! - [`glyph`] —
9//! a semantic [`Glyphs`] set (✓ ✗ ⚠ ℹ • → …) with a pure-ASCII fallback for terminals without UTF-8 support.
10//!
11//! Both resolve from a single boolean so callers render identically regardless of terminal capability,
12//! and both expose an env-free constructor for deterministic tests.
13//!
14//! [`NO_COLOR`]: https://no-color.org
15
16pub mod color;
17pub mod glyph;
18
19pub use color::{
20 ColorChoice, NO_COLOR_ENV, Palette, no_color_env_set, resolve_color, resolve_color_with,
21};
22pub use glyph::{Glyphs, UTF8_LOCALE_ENVS, unicode_env_enabled};