use egui::Color32;
use crate::reply::convs::{AgentState, Tone};
const LIVE: Color32 = Color32::from_rgb(0x7f, 0xd1, 0x8f);
const IN_FLIGHT: Color32 = Color32::from_rgb(0x7f, 0xb6, 0xd1);
const STOPPED: Color32 = Color32::from_rgb(0xd1, 0x8f, 0x7f);
const GOOD: Color32 = Color32::from_rgb(0x8f, 0xd1, 0x7f);
const BAD: Color32 = Color32::from_rgb(0xd1, 0x7f, 0x7f);
const PLAIN: Color32 = Color32::from_rgb(0xc8, 0xc8, 0xc8);
const WEAK: Color32 = Color32::from_rgb(0x88, 0x88, 0x88);
pub const NOTICE: Color32 = Color32::from_rgb(0xe0, 0xa0, 0x60);
pub fn state_ink(state: &AgentState) -> Color32 {
match state {
AgentState::Live => LIVE,
AgentState::InFlight => IN_FLIGHT,
AgentState::Stopped => STOPPED,
AgentState::Quiescent | AgentState::Unknown(_) => PLAIN,
}
}
pub fn tone_ink(tone: &Tone) -> Color32 {
match tone {
Tone::Live => LIVE,
Tone::InFlight => IN_FLIGHT,
Tone::Good => GOOD,
Tone::Bad => BAD,
Tone::Weak => WEAK,
Tone::Plain | Tone::Unknown(_) => PLAIN,
}
}
pub fn visuals() -> egui::Visuals {
egui::Visuals::dark()
}
#[cfg(test)]
mod tests;