pub struct RchTheme;Expand description
RCH brand colors and semantic styles.
§Design Philosophy
- Purple: Compilation/build theme - sophisticated, technical
- Cyan: Data transfer theme - clean, digital
- Amber: Attention/highlights - warm, visible
§Example (with rich-ui feature)
ⓘ
use rch_common::ui::RchTheme;
let style = RchTheme::success();
// Use style with rich_rust ConsoleImplementations§
Source§impl RchTheme
impl RchTheme
Sourcepub const PRIMARY: &'static str = "#8B5CF6"
pub const PRIMARY: &'static str = "#8B5CF6"
Primary brand color - Purple (compilation/build theme).
Sourcepub const SECONDARY: &'static str = "#06B6D4"
pub const SECONDARY: &'static str = "#06B6D4"
Secondary brand color - Cyan (data/transfer theme).
Sourcepub const STATUS_HEALTHY: &'static str = "#10B981"
pub const STATUS_HEALTHY: &'static str = "#10B981"
Worker is healthy and accepting work - Green.
Sourcepub const STATUS_DEGRADED: &'static str = "#F59E0B"
pub const STATUS_DEGRADED: &'static str = "#F59E0B"
Worker is degraded (slow, high error rate) - Amber.
Sourcepub const STATUS_UNREACHABLE: &'static str = "#EF4444"
pub const STATUS_UNREACHABLE: &'static str = "#EF4444"
Worker is unreachable (connection failed) - Red.
Sourcepub const STATUS_DRAINING: &'static str = "#8B5CF6"
pub const STATUS_DRAINING: &'static str = "#8B5CF6"
Worker is draining (no new work) - Purple.
Sourcepub const STATUS_DRAINED: &'static str = "#6366F1"
pub const STATUS_DRAINED: &'static str = "#6366F1"
Worker is drained (drain complete, idle) - Indigo.
Sourcepub const STATUS_DISABLED: &'static str = "#737B8A"
pub const STATUS_DISABLED: &'static str = "#737B8A"
Worker is disabled (admin disabled) - Gray.
Sourcepub fn worker_status_str(status: &str) -> Style
pub fn worker_status_str(status: &str) -> Style
Create style for worker status based on string.
Sourcepub fn for_worker_status(status: WorkerStatus) -> Style
pub fn for_worker_status(status: WorkerStatus) -> Style
Create style for worker status enum.
Sourcepub fn table_header() -> Style
pub fn table_header() -> Style
Style for table headers.
Sourcepub fn table_border() -> Style
pub fn table_border() -> Style
Style for table borders.
Sourcepub fn panel_title() -> Style
pub fn panel_title() -> Style
Style for panel titles.
Sourcepub const fn color_for_worker_status(status: WorkerStatus) -> &'static str
pub const fn color_for_worker_status(status: WorkerStatus) -> &'static str
Get color hex code for a worker status.
Sourcepub fn color_for_status_str(status: &str) -> &'static str
pub fn color_for_status_str(status: &str) -> &'static str
Get color hex code for a status string (case-insensitive).
Auto Trait Implementations§
impl Freeze for RchTheme
impl RefUnwindSafe for RchTheme
impl Send for RchTheme
impl Sync for RchTheme
impl Unpin for RchTheme
impl UnsafeUnpin for RchTheme
impl UnwindSafe for RchTheme
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more