use ratatui::style::Color;
pub fn heat_color(count: u32, max: u32) -> Color {
if count == 0 {
return Color::Rgb(22, 27, 34);
}
let ratio = count as f64 / max.max(1) as f64;
if ratio < 0.25 {
Color::Rgb(14, 68, 41)
} else if ratio < 0.5 {
Color::Rgb(0, 109, 50)
} else if ratio < 0.75 {
Color::Rgb(38, 166, 65)
} else {
Color::Rgb(57, 211, 83)
}
}