tweak thresholds for shimmer on non-true-color terminals (#2533)

https://github.com/user-attachments/assets/dc7bf820-eeec-4b78-aba9-231e1337921c
This commit is contained in:
Jeremy Rose
2025-08-21 11:44:18 -07:00
committed by GitHub
parent 24c7be7da0
commit 5fac7b2566

View File

@@ -63,9 +63,11 @@ pub(crate) fn shimmer_spans(text: &str) -> Vec<Span<'static>> {
}
fn color_for_level(level: u8) -> Style {
if level < 144 {
// Tune thresholds so the edges of the shimmer band appear dim
// in fallback mode (no true color support).
if level < 160 {
Style::default().add_modifier(Modifier::DIM)
} else if level < 208 {
} else if level < 224 {
Style::default()
} else {
Style::default().add_modifier(Modifier::BOLD)