MCPcopy Create free account
hub / github.com/cgsdev0/termsand / write_color

Function write_color

src/main.rs:392–403  ·  view source on GitHub ↗
(lock: &mut io::StdoutLock<'static>, fg: u32)

Source from the content-addressed store, hash-verified

390
391impl Cell {
392 fn is_box_char(&self) -> bool {
393 match self.c {
394 '\u{2500}'..='\u{257F}' => true,
395 _ => false,
396 }
397 }
398 fn is_empty(&self) -> bool {
399 (self.c == '\0' || self.c == ' ') && self.style.underline == Underline::Off
400 }
401}
402
403fn write_bg_color(lock: &mut io::StdoutLock<'static>, bg: u32) {
404 if bg == u32::MAX {
405 write!(lock, "\x1b[49m").unwrap();
406 } else if bg < (1 << 31) {

Callers 2

renderMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected