ringkernel_txmon/gui/
theme.rs

1//! Dark banking theme colors.
2
3use iced::Color;
4
5/// Color palette for the application.
6pub mod colors {
7    use super::*;
8
9    /// Main background color.
10    pub const BACKGROUND: Color = Color::from_rgb(0.08, 0.09, 0.11);
11
12    /// Surface color for cards/panels.
13    pub const SURFACE: Color = Color::from_rgb(0.12, 0.13, 0.16);
14
15    /// Brighter surface for hover/active states.
16    pub const SURFACE_BRIGHT: Color = Color::from_rgb(0.18, 0.19, 0.22);
17
18    /// Border color.
19    pub const BORDER: Color = Color::from_rgb(0.25, 0.26, 0.30);
20
21    /// Primary text color.
22    pub const TEXT_PRIMARY: Color = Color::from_rgb(0.92, 0.92, 0.94);
23
24    /// Secondary/muted text color.
25    pub const TEXT_SECONDARY: Color = Color::from_rgb(0.6, 0.62, 0.66);
26
27    /// Disabled text color.
28    pub const TEXT_DISABLED: Color = Color::from_rgb(0.4, 0.42, 0.46);
29
30    /// Primary accent color (blue).
31    pub const ACCENT_BLUE: Color = Color::from_rgb(0.2, 0.5, 0.9);
32
33    /// Success/positive color (green).
34    pub const ACCENT_GREEN: Color = Color::from_rgb(0.2, 0.8, 0.4);
35
36    /// Warning color (orange).
37    pub const ACCENT_ORANGE: Color = Color::from_rgb(0.9, 0.5, 0.1);
38
39    /// Critical alert color (red).
40    pub const ALERT_CRITICAL: Color = Color::from_rgb(0.9, 0.2, 0.2);
41
42    /// High alert color (orange).
43    pub const ALERT_HIGH: Color = Color::from_rgb(0.9, 0.5, 0.1);
44
45    /// Medium alert color (yellow).
46    pub const ALERT_MEDIUM: Color = Color::from_rgb(0.9, 0.8, 0.2);
47
48    /// Low alert color (green).
49    pub const ALERT_LOW: Color = Color::from_rgb(0.4, 0.7, 0.4);
50
51    /// Money positive (incoming).
52    pub const MONEY_POSITIVE: Color = Color::from_rgb(0.2, 0.8, 0.4);
53
54    /// Money negative (outgoing).
55    pub const MONEY_NEGATIVE: Color = Color::from_rgb(0.9, 0.3, 0.3);
56
57    /// Running state color.
58    pub const STATE_RUNNING: Color = Color::from_rgb(0.2, 0.8, 0.4);
59
60    /// Paused state color.
61    pub const STATE_PAUSED: Color = Color::from_rgb(0.9, 0.8, 0.2);
62
63    /// Stopped state color.
64    pub const STATE_STOPPED: Color = Color::from_rgb(0.6, 0.62, 0.66);
65}
66
67/// Get color for alert severity.
68pub fn severity_color(severity: crate::types::AlertSeverity) -> Color {
69    match severity {
70        crate::types::AlertSeverity::Low => colors::ALERT_LOW,
71        crate::types::AlertSeverity::Medium => colors::ALERT_MEDIUM,
72        crate::types::AlertSeverity::High => colors::ALERT_HIGH,
73        crate::types::AlertSeverity::Critical => colors::ALERT_CRITICAL,
74    }
75}