Skip to content

Commit

Permalink
Add comment about kitty's text_fg_override_threshold
Browse files Browse the repository at this point in the history
  • Loading branch information
joveian authored and sharkdp committed Nov 2, 2023
1 parent c8766e1 commit f205dec
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cli/hdcanvas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ impl Canvas {
}
}

// The kitty terminal has a feature text_fg_override_threshold that
// checks the difference in luminosity between text and background and
// changes the text to black or white to make it readable if the
// luminosity difference percentage is below the specified threshold.
// Using block characters for graphics display can trigger this, causing
// black or white lines or blocks, if the color is the same or too close.
// The checkerboard should be ok unless the theshold is set fairly high.
pub fn print(&self, out: &mut dyn Write) -> Result<()> {
for i_div_2 in 0..self.height / 2 {
for j in 0..self.width {
Expand Down

0 comments on commit f205dec

Please sign in to comment.