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:
@@ -63,9 +63,11 @@ pub(crate) fn shimmer_spans(text: &str) -> Vec<Span<'static>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn color_for_level(level: u8) -> Style {
|
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)
|
Style::default().add_modifier(Modifier::DIM)
|
||||||
} else if level < 208 {
|
} else if level < 224 {
|
||||||
Style::default()
|
Style::default()
|
||||||
} else {
|
} else {
|
||||||
Style::default().add_modifier(Modifier::BOLD)
|
Style::default().add_modifier(Modifier::BOLD)
|
||||||
|
|||||||
Reference in New Issue
Block a user