From be28b4ff806cbc197325bf24aa241095d328f62d Mon Sep 17 00:00:00 2001 From: kjuulh Date: Thu, 30 May 2024 23:05:00 +0200 Subject: [PATCH] feat: add colors Signed-off-by: kjuulh --- .../src/components/render_graph/summarize.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/crates/hyperlog-tui/src/components/render_graph/summarize.rs b/crates/hyperlog-tui/src/components/render_graph/summarize.rs index 6cd8fa4..ef06d39 100644 --- a/crates/hyperlog-tui/src/components/render_graph/summarize.rs +++ b/crates/hyperlog-tui/src/components/render_graph/summarize.rs @@ -4,6 +4,7 @@ use ratatui::prelude::*; const GREEN: Color = Color::Rgb(127, 255, 0); const ORANGE: Color = Color::Rgb(255, 165, 0); +const PURPLE: Color = Color::Rgb(138, 43, 226); pub trait Summarize { fn heading(&self) -> Vec; @@ -21,20 +22,20 @@ impl Summarize for MovementGraphItem { vec![ name, - Span::from(" ~ "), - Span::from(format!("(items: {})", items)), + Span::from(" ~ ").fg(PURPLE), + Span::from(format!("(items: {})", items)).fg(Color::DarkGray), ] } GraphItemType::Item { done } => { if done { vec![ - Span::from("["), + Span::from("[").fg(Color::DarkGray), Span::from("x").fg(GREEN), - Span::from("] "), + Span::from("] ").fg(Color::DarkGray), name, ] } else { - vec![Span::from("[ ] "), name] + vec![Span::from("[ ] ").fg(Color::DarkGray), name] } } }