diff --git a/vga_buffer/src/lib.rs b/vga_buffer/src/lib.rs index b604e43..412fd3d 100644 --- a/vga_buffer/src/lib.rs +++ b/vga_buffer/src/lib.rs @@ -283,6 +283,10 @@ pub fn _print(args: fmt::Arguments) { WRITER.lock().write_fmt(args).unwrap(); } +pub fn set_colors(fg: ForegroundColor, bg: Color) { + WRITER.lock().color_code = ColorCode::new(fg, bg); +} + lazy_static! { pub static ref WRITER: Mutex = Mutex::new(Writer::new( ColorCode::new(ForegroundColor::Yellow, Color::Blue),